Msg#: 4140170 posted 2:54 pm on May 26, 2010 (gmt 0)
Hey guys, I need some help here. I have 1 server running on Mac OS X and on that server I run a few domains. I need a scalable solution for clients to manage their websites via Perl based file browser and rich text editor.
domain01.com here I have my CGI-Perl Directory domain02.com here I have a clients website running domain03.com here I have a clients website running domain04.com here I have a clients website running
I use a Perl based file browser to write webpages into domain 01 02 and 03. The Perl based file browser needs to be able to unlink files on domain 01 02 and 03. Creating directories and renaming them works fine but unlinking doesn't All domains run on the same webserver.
Do I need to send admin permissions with the unlink request and if so, how do I do that?
Msg#: 4140170 posted 3:44 pm on May 26, 2010 (gmt 0)
Hello Mat, I am trying to remove files and folders from domain01 02 and 03 Via a CGI that is running on domain01. I dont want to put my complete CGI directory in every client domain. Like I said, renaming and creating files and folders works file only deleting doesnt.
Msg#: 4140170 posted 3:55 pm on May 26, 2010 (gmt 0)
From your original post, it sounds like you are fine with the files, but it is the deleting of the directories that is not happening--is this correct? If so, you should probably take a peak at the documentation I posted before. Basically, 'unlink' won't work on directories unless you are running the Perl process as the superuser, and with a special '-U' flag enabled. The docs go on to say that not only is 'unlink' not the safest way to remove directories, it doesn't even work on a number of operating systems (perhaps OS X is one?). That's where 'rmdir' is preferred.
If unlink isn't working on files either, check $! after a failed delete for some error information (might not be super-useful, but at least it is something).