Wednesday, January 26, 2011

CHMOD Behaviour Explained combined with Apache User & PHP SUDO Query

Hi,

Firstly I am sure this is nothing to do with a fault, just something I am not doing correctly. I have a web server running on Ubuntu. I have the following problem:

Fly2.png owner=iancant group=iancant

Group iancant = users/members: iancant, www-data

When I chmod Fly2.png to give rwx access to the group I am showed a forbidden error. Doesn't www-data being a member of group: iancant not have rights to open the file?

www-data is an apache user, I was led to believe that the Apache user logged in only it had received an inbound request. If this is not the case, as demonstrated when my initial problem was solved where does that leave permissions on PHP running as an Apache module?

If I were to elevate the PHP (and therefore apache) user with sudo to perform a few system exercises does this mean that it will retain these sudo privileges until the apache server is restarted?

Thanks In Advance.

  • Only the owner of a file (or root, naturally) can modify its permissions.

    From MikeyB

0 comments:

Post a Comment