12-09-2015
Notice, that the UMASK is the inverted number the file mode is set to.
That is: the normal file rights are three sets of digits 0-7. UMASK now is what you take away from "777" to arrive at the result. If your UMASK is (hypothetically) "777" that will result in a file with mode "000". If you set the UMASK to "037" that will set the file mode to "640" (the "7" would be the x-bit set which is not done automatically, therefore 6 and not 7 in the first digit).
Note also, that directory rights work a bit different than file rights. For a newly created directory you may want to have the x-bit set (otherwise you can't change into it, regardless of having read-rights or not) and therefore there is a difference between UMASK 037 and UMASK 027, like MadeInGermany suggested.
I hope this helps.
bakunin
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I have two problems:
1. The service command does not work on my system! I mean when I enter:
service ... start
I get: bash: service: command not found
2. I want to launch my vsftpd server. I tried to launch it using service command and you see that it didn't work!
Please help... (1 Reply)
Discussion started by: HSN
1 Replies
2. Linux
I setup vsftpd.conf as follows and tried to login using root and normal user 'winston' but failed authentication. Any idea what's wrong?
========================
CONTENTS OF /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
local_enable=YES
dirmessage_enable=YES
connect_from_port_20=YES... (3 Replies)
Discussion started by: panggou
3 Replies
3. UNIX for Dummies Questions & Answers
Hello,
When my fellow employees loggin to the FTP server they have no problems if they use FTP clients.
When they try and access the FTP site using their browsers using ftp://<domain> name all they get is a pub directory which is empty. They are not even prompted for loggin.
How to fix... (2 Replies)
Discussion started by: mojoman
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am using VSFTPD.
I have instructed it to send all logging informartion to /var/log/messages.
I would like it to record the names of users who have failed loggin attempts. I have read up on it but have not found out how to do this. Any ideas? (1 Reply)
Discussion started by: mojoman
1 Replies
5. UNIX for Dummies Questions & Answers
Hi there.
Im studying and i've got an exercise that i cannot fully understand. Im trying and testing, but it didnt works
What i need to configure ftps ( vsftpd ) with openssl? (1 Reply)
Discussion started by: andriusman
1 Replies
6. Red Hat
hi everybody,
i am new to linux. iam using centos 6.2, and trying to configure ftp server in my local network, i have seen one fpt server how to videos tutriol but iam unable to follow i have some confussion in /etc/vsftpd/vsftpd.conf about userlist_enable and userlist_deny,... (6 Replies)
Discussion started by: paruhang
6 Replies
7. UNIX for Dummies Questions & Answers
$ rpm -ivh vsftpd-2.2.2-6.el6.i686.rpm
warning: vsftpd-2.2.2-6.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)
why is it actually happening am goin nuts plzz help me out :( (1 Reply)
Discussion started by: lost101
1 Replies
8. UNIX for Advanced & Expert Users
hello mighty all
there's a problem in vsftpd
it allows to delete files which have 000 mode and root:root owner
also 400
even with option deny_file={those_files} - still allowed
i'm doing it through mc
through ftp-shell it's not allowed
it's not working if mother-dir have -w
and not working... (3 Replies)
Discussion started by: tip78
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I installed debian jessie and friend asked me to install for him vsftpd, of course, first I try at my vps, but I don't get it to work.
there are many tutorials to install ftp server but as i said, it is not working and beside running ftp server, I need for him and some GUI to use it, he is... (2 Replies)
Discussion started by: alanford
2 Replies
10. UNIX for Advanced & Expert Users
:rolleyes:I am trying to setup all certificate based client-server environment in Linux using vsftpd and curl with openssl.
I would like to make a user access with vsftpd certificate and user own client certificate (self-signed) with private/public key.
I don't see google posts about the my plan... (4 Replies)
Discussion started by: gogogo
4 Replies
UMASK(2) BSD System Calls Manual UMASK(2)
NAME
umask -- set file creation mode mask
SYNOPSIS
#include <sys/stat.h>
mode_t
umask(mode_t cmask);
DESCRIPTION
The umask() routine sets the process's file mode creation mask to cmask and returns the previous value of the mask. The 9 low-order access
permission bits of cmask are used by system calls, including open(2), mkdir(2), mkfifo(2), and mknod(2) to turn off corresponding bits
requested in file mode. (See chmod(2)). This clearing allows each user to restrict the default access to his files.
The default mask value is S_IWGRP | S_IWOTH (022, write access for the owner only). Child processes inherit the mask of the calling process.
RETURN VALUES
The previous value of the file mode mask is returned by the call.
ERRORS
The umask() function is always successful.
LEGACY SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
The include file <sys/types.h> is necessary.
SEE ALSO
chmod(2), mkdir(2), mkfifo(2), mknod(2), open(2), compat(5)
STANDARDS
The umask() function call is expected to conform to IEEE Std 1003.1-1988 (``POSIX.1'').
4th Berkeley Distribution June 4, 1993 4th Berkeley Distribution