Re: VSFTP configuration help

I’m bumping this back to the top. I still can’t seem to figure out how
to get vsftpd configured so files get uploaded with the permissions I
want. Things have changed a bit since I started this thread nearly a
year ago. I need users (not virtual) to be able to upload directories to
a Web server, and those directories should have permissions of 775. I
have the sticky bit enabled on the parent directory so the group is
inherited.

I changed the config file to have a umask value of 0002:

file_open_mode=0777
local_umask=0002

Yet if I upload a directory it still has permissions of 755. I don’t
understand.


boy412

boy412’s Profile: http://forums.novell.com/member.php?userid=102125
View this thread: http://forums.novell.com/showthread.php?t=429593

boy412,

I have tried using your config from your first post, with the exception
of making local_umask=0002 as mentioned in your last post, and setting
my own local_root as well. In my testing, it works the way you want it
to. I’m am not sure why it would be failing. Here’s a few ideas /
points / reactions:

  1. do: grep umask /etc/pam.d/* and see if there are any pam umask
    settings there might be which could be influencing this.

  2. Is it possible you have local_umask in your vsftpd.conf twice, and
    you are only changing one occurrance?

  3. I am testing with user whose shell is /bin/bash. Are you using
    that as well?

  4. You mentioned that you have the “sticky bit enabled on the parent
    directory so the group is inherited.” However, the sticky bit doesn’t
    serve that function (though that is a common mis-conception /
    mis-label). The setgid bit serves that function. (see man 1 chmod).
    Sticky bit appears in ls -al as “t”. Setgid bit appears as “s”. Which
    one do you really have set? I tested with “s” (setgid) on the parent
    (drwxr-sr-x). I would have tried “t” as well, just in case, but it
    doesn’t even seem to let me set that on my file systems (which are ext3
    and reiserfs).

  5. Which kind of file system are you using?

  6. I note in your original description you talk about “uploading a
    file to a directory” and in the last post you are talking about
    “uploading a directory, and those directories should have permissions of
    775.” Just to make sure I’m not misunderstanding:
    a. So now we’re focused on results for directory permissions, not file
    permissions. Right?
    b. Technically ftp doesn’t “upload a directory”. It can make (create)
    a directory and then upload files into it. But it has no command to
    “upload” a directory. So what exact sequence of commands are you really
    using? Or are you using some kind of smart client where you just
    highlight a directory and click “upload” and it figures out the sequence
    of commands to use? In that case, can you have that client save a log
    of the actual commands it generates, of a simple example of this, and
    supply that log here?

  7. I presume you are using vsftpd packages as provided by SuSE, and
    you have not recompiled from source code. ?


dpartrid

dpartrid’s Profile: http://forums.novell.com/member.php?userid=18260
View this thread: http://forums.novell.com/showthread.php?t=429593