# Re: VSFTP configuration help

**URL:** <https://forums.suse.com/t/re-vsftp-configuration-help/21978>\
**Category:** SLES Networking\
**Created:** [December 9, 2011, 10:16pm UTC](https://forums.suse.com/t/re-vsftp-configuration-help/21978 "2011-12-09T22:16:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![System1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@System1](https://forums.suse.com/u/System1)\
**Post date:** [December 9, 2011, 10:16pm UTC](https://forums.suse.com/t/re-vsftp-configuration-help/21978/1 "2011-12-09T22:16:02Z")

</div>

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](http://forums.novell.com/member.php?userid=102125)  
View this thread: [http://forums.novell.com/showthread.php?t=429593](http://forums.novell.com/showthread.php?t=429593)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [January 10, 2012, 2:26am UTC](https://forums.suse.com/t/re-vsftp-configuration-help/21978/2 "2012-01-10T02:26:02Z")

</div>

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](http://forums.novell.com/member.php?userid=18260)  
View this thread: [http://forums.novell.com/showthread.php?t=429593](http://forums.novell.com/showthread.php?t=429593)
