I have Apache 2, MySQL server, PHP5 installed on openSuSE 11.
My web site is in /srv/www/htdocs/mywebsite
I upload files over FTP and link them to WEB site for download.
When I want to download file over hyperlink, I get “access denied” in web page.
After manually setting CHMOD permissions so “OTHER” can read, everything is OK.
I don’t want to manually set permissions every time I upload files for download.
How can I set default permissions on folder, so when I copy files into it, they inherit permissions from parent?
Home directory of FTP user is /srv/www/htdocs/mywebsite
Which FTP server are you using on the server that’s running Apache? Most of them will let you config the “umask” setting, which is the default permissions on uploaded files. For example, for ProFTPD:
ProFTPD mini-HOWTO - Umask
I’m using VSFTPD.
Tried with umask over folder where files that should be downloaded, but no good…
Default permissions, when I copy files into folder are “OWNER : READ ; WRITE”
You have gave me a great idea lol! !!!
I have configured vsftpd.conf with:
Now, by default, when I copy files into folder, I get, among else “ALL USERS : READ”.