#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    5
    Rep Power
    0
    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. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>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?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    5
    Rep Power
    0
    >>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
  6. #4
  7. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    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).]
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    5
    Rep Power
    0
    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
  10. #6
  11. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>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.
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    5
    Rep Power
    0
    > 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
  14. #8
  15. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Which FTP server? If proftpd, check this out -> http://www.proftpd.net/docs/configuration.html#Umask

IMN logo majestic logo threadwatch logo seochat tools logo