Jump to content

[SOLVED] File permissions


bruce080

Recommended Posts

I need help removing some write-protected files.  On the linux machine, I am a member of the group "www-data" and am trying to remove files from the the directory named "customer_care".  The file permissions for this directory is below:

 

sbruce@msa1:/var/www$ ls-l

drwxr-xr-x  9 www-data www-data 4096 2009-09-25 11:19 customer_care

 

My group is the owner of the directory, but yet I am running into permissions errors when trying to remove files (the file permissions are the same).  Is there a problem with o=rwx and g=r-x?  Do the group permissions also have to be rwx even though the group is the owner of the directory?

 

Thanks,

Steven

 

Link to comment
https://forums.phpfreaks.com/topic/175819-solved-file-permissions/
Share on other sites

Upon careful inspection, you are correct: your group permissions are  the problem.  Additionally, you *may* be misunderstanding whats going on with unix permissions.

 

Is there a problem with o=rwx and g=r-x?  Do the group permissions also have to be rwx even though the group is the owner of the directory?

 

The owner (rwx) is www-data.  You are a member of the group www-data (r-x).

 

Again:

The directory's OWNER, is the user www-data, the directory's GROUP is the group www-data. 

 

This does not mean if you are in the www-data group, that you are the owner. The naming here is confusing and I think thats where you are getting hung-up.

 

Imagine if you changed the owner to 'bruce080'.  This would not affect anyone's permissions in the www-data group, because www-data doesn't 'own' the directory, 'bruce080' does.

 

The short answer is you need write permissions for group. 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.