Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with directory permission...
#1

Hello to all expert here,

 

I need help from everyone here urgently. I have a server running fedora core, plesk and WebGUI.

 

All the while everything works perfectly, but recently, when I use WebGUI to edit my website, I have problem uploading new image files. The problem is, the directory created to hold the image is created by the script and with permission of '666' with owner of 'apache' and group 'apache'. So the directory is created, but the server don't allow the script to put the image file into the directory.

 

The worst case is, this is not consistently happen, sometimes it can upload image because the directory is created with correct permission instead of '666'. I have tried to search Google and etc try to find answer that can help, but no luck.

 

I hope someone here can help me solve this problem. Thank you.

 

Regards,

Lesz

Reply
#2

Quote:I hope someone here can help me solve this problem. Thank you.
 

Hi, you are using the permissions slightly incorrectly. Directory permissions are slightly different to file permissions.

 

666 for a directory is: drw-rw-rw- which has no x permission. So it cannot be accessed.

 

If your user/group is apache, then you can do this:



Code:
chmod 770 uploaddirectory/




 

770 for a directory is: drwxrwx--- .. therefore apache has read, write and access permissions.

 

Check out what I wrote about understanding access permissions.

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)