Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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 have just set up a server on Debian Etch, I have Apache2, PHP, MySQL and VSFTPD installed. I have ftp access to /var/www and I can upload everything just fine. However when I try to open the server (192.168.1.50) in a browser I get:
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Fatal error: Unknown: Failed opening required '/var/www/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0
Obviously a permissions problem. I deleted the apache2-defaults folder and changed the ownership of the www folder to webmaster (my ftp user).
What can I do to allow anything in that folder to be viewable from now on?
so the directory where the files reside has to be executable, the files at least readable.
the solutions above are pretty restrictive, adjust to your needs
I can do that and then the files load in the browser, but every time I add a new file or update an existing one, I have to run that again. Is there a way to make it so any file uploaded via ftp to the /var/www is automatically set to a certain permission (ie 0444)?
I had to set the umask in my vsftpd configuration so files that are uploaded are set to the proper permissions.
Thanks for your help.
Thank you! This solved my problem, which I had been working on for days.
(It is a mystery to me that, if this is required, it is not a common problem. Seems like a ton of people run servers and most of them put files there by ftp. Is it common knowledge that there is a umask setting in the ftp server? Yet in all my searches regarding my problem getting files readable on my server, this is the only place I have seen reference to this problem.)
I had to set the umask in my vsftpd configuration so files that are uploaded are set to the proper permissions.
Thanks for your help.
How did you do that? I've been trying to set up my localhost to use firebird but hit a steel/concrete wall every time with the same error you had...HELP ME PLEASE!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.