Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

vavra

umask

Hello,
I have following problem. My colleagues upload files via these two ways
1. Drupal web app - it's apache, running as apache:apache
2. WinSCP - user ts1:apache

Users apache and ts1 have primary group apache and they have set umask 002.
Umask affects all users's processes to create files with rights rw-rw-r-- (+w for group vs. default conf.)

I have a file a.txt uploaded using Drupal (1).
If I rewrite a.txt usign Apache(2), the file is rewritten but I recieve an error message: Upload of file 'a.txt' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permission errors' option. ("Permission denied.
See the log snippet below.

If I do this using vi editor in ssh, I can edit a file without an error.

I know I can check the Ignore permission option. But is there a way where I hadn't to mask permission errors? Can WinSCP use umask settings in ~/.profile?


Jan


Log:

. 2011-11-29 14:25:41.856 Remote file 'a.txt' already exists. Overwrite?
. 2011-11-29 14:25:41.856
. 2011-11-29 14:25:41.856 New: 7 bytes, 29.11.2011 14:25:33
. 2011-11-29 14:25:41.856 Existing: 5 bytes, 29.11.2011 14:11:49 ()
> 2011-11-29 14:25:43.513 Type: SSH_FXP_OPEN, Size: 49, Number: 4611
< 2011-11-29 14:25:43.550 Type: SSH_FXP_HANDLE, Size: 13, Number: 4611
> 2011-11-29 14:25:43.551 Type: SSH_FXP_WRITE, Size: 32, Number: 5126
> 2011-11-29 14:25:43.551 Type: SSH_FXP_CLOSE, Size: 13, Number: 5380
> 2011-11-29 14:25:43.551 Type: SSH_FXP_SETSTAT, Size: 45, Number: 4873
< 2011-11-29 14:25:43.553 Type: SSH_FXP_STATUS, Size: 24, Number: 5126
< 2011-11-29 14:25:43.555 Type: SSH_FXP_STATUS, Size: 24, Number: 5380
< 2011-11-29 14:25:43.555 Status code: 0
< 2011-11-29 14:25:43.555 Type: SSH_FXP_STATUS, Size: 34, Number: 4873
< 2011-11-29 14:25:43.555 Status code: 3, Message: 4873, Server: Permission denied, Language:
* 2011-11-29 14:25:43.555 (ETerminal) Permission denied.
* 2011-11-29 14:25:43.555 Error code: 3
* 2011-11-29 14:25:43.555 Error message from server: Permission denied
* 2011-11-29 14:25:43.555 Request code: 9
. 2011-11-29 14:25:43.556 Asking user:
. 2011-11-29 14:25:43.556 Upload of file 'a.txt' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permission errors' option. ("Permission denied.
. 2011-11-29 14:25:43.556 Error code: 3
. 2011-11-29 14:25:43.556 Error message from server: Permission denied
. 2011-11-29 14:25:43.556 Request code: 9")
* 2011-11-29 14:26:04.785 (EScpSkipFile) Upload of file 'a.txt' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permission errors' option.
* 2011-11-29 14:26:04.785 Permission denied.
* 2011-11-29 14:26:04.785 Error code: 3
* 2011-11-29 14:26:04.785 Error message from server: Permission denied
* 2011-11-29 14:26:04.785 Request code: 9
. 2011-11-29 14:26:04.817 Listing directory "/home/tsadmin/test".
> 2011-11-29 14:26:04.817 Type: SSH_FXP_OPENDIR, Size: 27, Number: 5643
< 2011-11-29 14:26:04.818 Type: SSH_FXP_HANDLE, Size: 13, Number: 5643
> 2011-11-29 14:26:04.819 Type: SSH_FXP_READDIR, Size: 13, Number: 5900
< 2011-11-29 14:26:04.820 Type: SSH_FXP_NAME, Size: 313, Number: 5900
> 2011-11-29 14:26:04.820 Type: SSH_FXP_READDIR, Size: 13, Number: 6156
< 2011-11-29 14:26:04.822 Type: SSH_FXP_STATUS, Size: 28, Number: 6156
< 2011-11-29 14:26:04.822 Status code: 1
> 2011-11-29 14:26:04.822 Type: SSH_FXP_CLOSE, Size: 13, Number: 6404