var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
Check the owner of a directory
How do I go about seeing who currently owns a file/folder? In a ftp program I can see it's owned by www root but when I go to change that owner to say www bob i get a invalid user " www ". The webserver is lighttpd so if anyone could help that'd be great.
Ok, found out lighttpd is www-data, but this user is having troubles uploading files and if I change the group or owner from www-data then the script cannot perform it's functions, is there a setting in proftp to override this?
Last edited by Bluz; 10-16-2009 at
ls -lad <directory > give us the output
drwxr-xr-x 5 www-data www-data 4096 2009-10-16
would it be ok to put the user in the www-data group?...Would that work for fixing this?
Rather than putting the user in the "www-data" group, create a new group and add the "www-data" usre and the user (bob) in the new group and assign it to your files that need "www-data" as the user.
Originally Posted by
The reason I said not to add the user(bob) in the "www-data" group because the user will have access to all those files that will have "www-data" as their user.
BTW, you will have to carry out all these steps as a root user.
| Server Setup | Security | Optimization | Troubleshooting | Server Migration
| Monthly and Task basis services.
: madaboutlinux[at]hotmail.com |
The best and recommended approach to this problem is to run PHP as CGI(suexec), that way PHP scripts get executed as the respective user of the account.
You can then keep the ownership of the folder and user.user and PHP scripts would still be able to write to the directory.
The insecure way of doing this would be to grant ownership of user.www-data to the folder and permissions 775 recursively but then you're opening a huge security risk by doing that.
The thing is, several users all use this script. So there's say 10 users to the one script.
Originally Posted by
By dumpster in forum Colocation and Data Centers
Last Post: 05-06-2008, 08:33 AM
By Aaron Luckie in forum Ecommerce Hosting & Discussion
Last Post: 09-15-2007, 01:46 AM
By SLiM_BoY in forum Dedicated Server
Last Post: 10-22-2006, 04:52 AM
By 19leo19 in forum Hosting Security and Technology
Last Post: 02-07-2006, 12:21 AM
By trafficbuild in forum Domain Names
Last Post: 08-22-2002, 10:37 AM