db369
12-24-2003, 11:22 AM
i recently set up apache2/php/mysql/openssl on a debian system. i also set up vsftpd with the hope of being able to manage the html directory from another (much faster) pc.
When I set it up, the only way i could figure out to access/update the files was to chown the DocumentRoot with my 'real' username. this worked fine, but it seemed insecure. after lots of research & forum posts, i found this link (http://www.nitecon.com/downloads/rh9tut.htm).
even though it was intended for rh9, i followed the vsftpd part. well, just this part:
groupadd www
useradd -g www -d /var/www/html ftpuser
passwd ftpuser
chown ftpuser:www /var/www/html
chmod 7777 /var/www/html
...where "/var/www/html" is actually my htdocs folder.
after doing this, i was able to access htdocs without a problem (although it didn't seem much more secure than using a real user).
however, i couldn't connect to my web server. i got "permission denied". i figured this was because it was running as 'nobody'. reluctantly, i changed it to "ftpuser" and changed the group to "www". i can now access the web server. but this seems screwy. also, it doesn't appear to be running with the permissions that the nobody user had. for example, my site is a personal web site and i have a script to set up photo albums, which creates a new folder for each album. now i can't create a folder -- permission denied....
i realize this is a real newb thing to ask, but ....
1) how do i reverse the above to get back to where i was before, and
2) can someone recommend a tutorial on setting up ftp with web server access?
any help would be great... thx!
When I set it up, the only way i could figure out to access/update the files was to chown the DocumentRoot with my 'real' username. this worked fine, but it seemed insecure. after lots of research & forum posts, i found this link (http://www.nitecon.com/downloads/rh9tut.htm).
even though it was intended for rh9, i followed the vsftpd part. well, just this part:
groupadd www
useradd -g www -d /var/www/html ftpuser
passwd ftpuser
chown ftpuser:www /var/www/html
chmod 7777 /var/www/html
...where "/var/www/html" is actually my htdocs folder.
after doing this, i was able to access htdocs without a problem (although it didn't seem much more secure than using a real user).
however, i couldn't connect to my web server. i got "permission denied". i figured this was because it was running as 'nobody'. reluctantly, i changed it to "ftpuser" and changed the group to "www". i can now access the web server. but this seems screwy. also, it doesn't appear to be running with the permissions that the nobody user had. for example, my site is a personal web site and i have a script to set up photo albums, which creates a new folder for each album. now i can't create a folder -- permission denied....
i realize this is a real newb thing to ask, but ....
1) how do i reverse the above to get back to where i was before, and
2) can someone recommend a tutorial on setting up ftp with web server access?
any help would be great... thx!