Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I am new to Ubuntu/Apache. Recently I created a web-site, where I placed the files in the directory /var/www/Mysite. I set the owner of all files under /var/www/Mysite as www-data since Apache seemed to use this as the default user. The site is working properly.
However, now I want to update the site periodically by uploading files here from a Windows machine using some sftp client like Filezilla. However, if I connect as an ordinary user, I am not allowed to update the files in /var/www/Mysite, due to permission problem, which is expected. But I cannot also login as www-data, as I do not know its password. I reckon this should be a common enough problem. What is the standard solution?
Should I set a new password to www-data and use that to login through Filezilla? Will Apache work properly then?
Hello Celyr,
I tried out your suggestion of changing the ownership to a real user (say "newbie") and it worked fine. Thanks. The web application creates some log files. I had to give permission to www-data to write these directories and files.
Hello Chris,
Thanks for your suggestion too. However, I think this will not suit me fully. Almost all the files in my web site are group write-protected (permission 755) by default and I would like to retain it that way. Hence, even if I add the user newbie to www-data group, I won't be able to oevrwrite the files from a sftp client logging in as newbie.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.