Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
(Kind of) Linux newbie, and I'm at the point where I usually wreck my installation.
Scenario:
LAMP installed, vsftpd livened up, and accepting connections from my username.
Now, usually I find I can't FTP stuff in, and figure I don't have permission. So I 'chmod 777' my /var/www and everything FTPs in fine. But of course I can't view the website, so I 'chown -R' to root (I know this isn't a good idea, but in an internal environment it's generally got me going).
Anyway, this isn't working for me, and I know isn't good practice - so what am I supposed to be doing exactly?
The FTP user you are logging in as should belong to the same group that your /var/www directory belongs to. This would let both Apache and the FTP user have access without giving it up to everyone.
I would put both the user and Apache itself in their own group, say "web". Only add users to the group that absolutely need access, keep everyone else out.
and checked that my username is in 'webusers' but still no joy. I've also checked via my other test (trying to rename /var/www/index.html via FTP) but this isn't working. What have I missed?
problem is you can't ftp right?what's the error?what user do you use to login? and what is the default home directory of the user your using to login to the ftp?
do you use "su - toothsome" when switch user. BTW, changing permission of /var/www is not really recommended . you can set it to default back to 755 with uid and gid as root. recommended is to set the default home directory of your ftp after /var/www/html
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.