htdocs root permissions?
I'm having trouble getting files inserted into htdocs to be viewable on the web. Right now only root can edit/add/remove files under /var/www/htdocs. I'd like to make it so that other users are able to access it, especially from FTP.
I thought I had to set the "ownership" of the htdocs folder to the www username (that is what runs Apache under my slackware install), although I might wrong. Even if I was right I can't remember the commands to make it so :\ Anyone willing to help me out of this pickle? |
run "ls -l /var/www/htdocs/" and post results.
Files need to be world-readable (or readable by user apache runs as...) to view on the web (chmod a+r filename) |
Quote:
I should note viewing the files is not a problem, it's trying to modify and/or add/remove files from the htdocs and subsequent directories. |
Letting all users write to files in htdocs is terribly insecure, any user will be able to overwrite/erase any file!! Have you looked at using user dirs? Maybe if you explain what you are trying to do with more details I can help with a better solution here.
If you really want to do this, then change group permissions on the files +w and make sure users you want to do this are in 'users' group. They will need +x on the directories too... ps who is cgoff? Your user? |
Yes, my user is cgoff. I currently have the dir permissions to 777 (I realize the potential here, the box is NOT online at the moment and I'm burned for time, so I just 777ed everything for FTP access).
Basically what I'm looking for is allowing an FTP user (just one user) to have complete access to adding/removing/editing files within the htdocs dir and subdirs. That is all :) |
Ok, then I suggest changing group permissions to this ftp user you want...you probably already have a group for ftp...check /etc/group, you may see something like:
Code:
ftp::21: Code:
ftp::21:cgroff Code:
# chgrp -R ftp /var/www/htdocs/ Note that 'ftp' is arbitrary, you can create a new group if you want....just follow same instructions to add your user to the group, and chgrp the files. Edit: sorry, you need to 'chmod -R g+w htdocs' as well. |
All right, thanks! I'll give that a shot and see what happens. :)
|
All times are GMT -5. The time now is 04:12 PM. |