Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Undeletable files + dirs

Status
Not open for further replies.

RussellDonders

Programmer
Joined
Jun 10, 2001
Messages
27
Location
GB
Hi,
I have checked the knowledge base and perldoc but cant find an understandable answer for my problem.

What does umask do, I think it will sove my problem but don't even know what it does!?? The problem I have. I have written a script that uses mkdir($dirname, 0777) to create a dir and then puts a file into it. I thought all was fine but when I went through with FTP to try and delete the dirs i created it wouldnt let me delete them "error 500 operation not permitted". I noticed that the owner was the Apache web server rather than my ftp username. I had previously (in error) used 777 instead of 0777 when creating the dirs (which led to weird values 341 i think) but these directories were able to be deleted. How do I create dirs with a script that are deletable via my account when I FTP ??

Your help is much appreciated!


 
The ability to delete files (and directories) depends upon the permissions of the directory that contain them.

Make sure that you have write permission on that directory and you should be OK.

I have to admit, I never use umask - I always set the permissions of files and directories explicitly using [tt]chmod[/tt], and I always use the easy way of setting permissions as well, like this:

[tt]chmod gou+wrx file[/tt]

instead of:

[tt]chmod 777 file[/tt]
Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top