deletion issue (unlink wont work)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

deletion issue (unlink wont work)

Post by m3rajk »

one script uploads a file and the print out is something like
[dcfydllc@seed npWenS]$ ls -ls *112*
20 -rw------- 1 nobody nobody 18455 Jul 8 15:01 main.112.jpg
and when the deletion runs from the browser, it does not remove the image.

since they both run as nobody, i fail to see why it cannot remove the picture. it's not write protected

does anyone have any suggestions?
Last edited by m3rajk on Mon Jul 19, 2004 10:33 am, edited 1 time in total.
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

note: it should be coming up -666 because umask is called with 0111 and umask is 0777-umask for new permissions (if i understand it right)

http://us2.php.net/manual/en/function.umask.php
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

is there anyone here that has expereience with unlink?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

if you sent 0111 to umask, it should set the mask to 0111, not 0666...

0111 & 0777 = 0111
Post Reply