By Nexx
So, I am not use to setting up a web server so i’m sure there is an easy explanation for this that I don’t know.
Basically, anytime I upload a new file via ftp, the www-data user can not view it until I do
chmod -R 775 /var/www
I have to do this every single time when I upload a file, is there anyway to make it so that they can read any file uploaded in this directory?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
As Woet says, use SFTP yet you need to upload with the intended user for such website, not with root or any other user.
You need to check your folder has the right permissions and umask (which usually you don’t need to mess with).
if you use site1 user to upload, make sure your site main folder and subfolders has permissions for site1 (user) and apache (user).
Google for default permissions if you have been messing around.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.