Thread: strange behavior
Brought to you by:
xystrus
From: <Cra...@am...> - 2011-07-07 13:47:10
|
In the rssh.conf file I have the following. # Set the default umask umask = 006 # Users configuration user=bob:006:00011:/test Lately for some reason files are not getting the correct permissions anymore? they now get 640 instead of 644. I change the unask to 000 and the files get a permission of 664 ? ________________________________ Privileged and Confidential. This e-mail, and any attachments there to, is intended only for use by the addressee(s) named herein and may contain privileged or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited. |
From: Aurelin <au...@au...> - 2011-07-07 13:56:25
|
I'm not that used to umask, but could it be that for some reason your default permission is set to 644? Because if you then subtract 006, you'd get 64-2.. Maybe this'd lead to 640 (because.. Have you ever heard of a permission set to a value below zero?) I just read that on Linux the default for files is 666.. So 002 wouldn't give 644 anyway, would it? *think* Quoting Cra...@am...: > In the rssh.conf file I have the following. > > # Set the default umask > umask = 006 > # Users configuration > user=bob:006:00011:/test > Lately for some reason files are not getting the correct permissions > anymore? they now get 640 instead of 644. I change the unask to 000 > and the files get > a permission of 664 ? > > > > ________________________________ > Privileged and Confidential. This e-mail, and any attachments there > to, is intended only for use by the addressee(s) named herein and > may contain privileged or confidential information. If you have > received this e-mail in error, please notify me immediately by a > return e-mail and delete this e-mail. You are hereby notified that > any dissemination, distribution or copying of this e-mail and/or any > attachments thereto, is strictly prohibited. > |
From: Russ A. <rr...@st...> - 2011-07-07 17:41:14
|
Aurelin <au...@au...> writes: > I'm not that used to umask, but could it be that for some reason your > default permission is set to 644? > Because if you then subtract 006, you'd get 64-2.. Maybe this'd lead to > 640 (because.. Have you ever heard of a permission set to a value below > zero?) That isn't how umasks work. They're a bitmask that's applied with a bitwise and, not subtraction. With scp or sftp, the default file permission is whatever the ssh client declares (usually 0644, but it could be 0666 or 0600 depending on the client). Then the umask is applied, which at most can remove permission bits (not add them). So if the client uploads a file and the client says the permissions should be 0600, the file will never have less restrictive permissions than 0600. The only thing umask can be used to do is make the permissions more restrictive. -- Russ Allbery (rr...@st...) <http://www.eyrie.org/~eagle/> |
From: Russ A. <rr...@st...> - 2011-07-07 17:38:43
|
<Cra...@am...> writes: > In the rssh.conf file I have the following. > # Set the default umask > umask = 006 > # Users configuration > user=bob:006:00011:/test > Lately for some reason files are not getting the correct permissions > anymore? they now get 640 instead of 644. Well, yes. You're setting the umask to prevent files from having permissions of 644. The 006 umask will allow the last digit of the permissions to be at most 1. > I change the unask to 000 and the files get a permission of 664 ? Sounds like it's working properly.... -- Russ Allbery (rr...@st...) <http://www.eyrie.org/~eagle/> |