|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hi,
I've made a Linux server with Suse 6.4. The server runs apache, php and MySQL. Everything works fine except that if I upload files to my web directory with ftp I cannot access them. Apache gives the error that I haven't got the permission to read them. If I check the files in the webdir with ls -l it gives that only the root can read the uploaded files. My question is: how can I upload files with the correct permissions (so everyone can read them)? Greetings, Wytse |
|
#2
|
|||
|
|||
|
>>If I check the files in the webdir with ls -l it gives that only the root can read the uploaded files
So what was the output of ls -l for that? |
|
#3
|
|||
|
|||
|
>>So what was the output of ls -l for that?
something like: -rw------- 12 root users ..... I know that I can change it but I don't want that because I want to upload the files from a remote system. I can't always access the server. greetings, Wytse |
|
#4
|
|||
|
|||
|
I am not familiar with Suse, but you need to check your /etc/login.conf file if there is one. Also "man umask".
The umask value should be changed to 022. Your umask value is set to 077 currently. After making the change, run "cap_mkdb /etc/login.conf" For file: The umask (022) is to be subtracted from 666 -> 644 For dir: The umask (022) is to be subtracted from 777, that is 755 [This message has been edited by freebsd (edited August 24, 2000).] |
|
#5
|
|||
|
|||
|
Thanks for your reply but it still doesn't work:
> I am not familiar with Suse, but you need to check your /etc/login.conf file if there is one. There is none > The umask value should be changed to 022. > Your umask value is set to 077 currently. > After making the change, run "cap_mkdb /etc/login.conf" The umask value is already 022 Wytse |
|
#6
|
|||
|
|||
|
>>There is none
Then check your shell configure file (in your home directory) With umask 022, it doesn't matter whether you are ftping to your account or creating new file or new dir, the permissions are the same. You can "cd ~" then "touch file" then "ls -l file" If such file is -rw------- (600), then umask is 077. Likewise, if it's -rw-r--r-- (644), then umask is 022. You need to read manpage to find out how to configure this. |
|
#7
|
|||
|
|||
|
> Then check your shell configure file (in your home directory)
There is none > With umask 022, it doesn't matter whether > you are ftping to your account or creating > new file or new dir, the permissions are > the same. > > You can "cd ~" > then "touch file" > then "ls -l file" > If such file is -rw------- (600), then > umask is 077. > Likewise, if it's -rw-r--r-- (644), then umask is 022. If I create a file with toch it has: -rw-r--r-- but if I upload the file with FTP it has: -rw------- ... so it seems to matter ... Wytse |
|
#8
|
|||
|
|||
|
Which FTP server? If proftpd, check this out -> http://www.proftpd.net/docs/configuration.html#Umask
|
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Permissions problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|