- Mitglied seit
- 24 Dez 2008
- Beiträge
- 65
- Punkte für Reaktionen
- 0
- Punkte
- 0
When I login with a user whose homedir is on an external usb drive, via the console, directory permissions are inherited. So, for example, I can create: dir1/dir2. However, when I try to do this not via the console, but with an sftp client I can't create "dir2" because directory permissions are not inherited.
By using the console all is fine:
But when using an sftp client I can't create "dir2" and get a "permission denied". The console shows the directory permissions of "dir1" are different using an sftp client than when using the console (in bold):
Is there some way to change the default umask when logging in with a user using an sftp client? I tried changing the default umask by setting it in "/etc/profile", but that didn't work.
Why can I create directories multiple levels deep using the console, but not using the dropbear sftp method?
By using the console all is fine:
Code:
root@fritz:/var# mkdir /var/media/ftp/uStor06/ext/ftp/test
root@fritz:/var# adduser -h /var/media/ftp/uStor06/ext/ftp/test test
Changing password for test
New password:
Bad password: too short
Retype password:
Password for test changed by root
root@fritz:/var# ls -ld /var/media/ftp/uStor06/ext/ftp/test
drwxr-sr-x 2 test test 4096 Apr 30 00:51 /var/media/ftp/uStor06/ext/ftp/test
root@fritz:/var# login test
Password:
__ _ __ __ ___ __
|__ |_) |__ |__ | /
| |\ |__ |__ | /_
The fun has just begun ...
BusyBox v1.18.4 (2011-04-26 18:53:42 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
-sh: /etc/init.d/rc.conf: line 4: can't create /var/env: Permission denied
rm: can't remove '/var/htmltext.db': Permission denied
ln: /var/htmltext.db: File exists
rm: can't remove '/var/TZ': Permission denied
ln: /var/TZ: File exists
test@fritz:~$ mkdir -p dir1/dir2
test@fritz:~$ ls -ld dir1
[B]drwxrwsrwx[/B] 3 root test 4096 Apr 30 00:53 dir1
test@fritz:~$ ls -ld dir1/dir2
drwxrwsrwx 2 root test 4096 Apr 30 00:53 dir1/dir2
But when using an sftp client I can't create "dir2" and get a "permission denied". The console shows the directory permissions of "dir1" are different using an sftp client than when using the console (in bold):
Code:
test@fritz:~$ ls -ld dir1
[B]drwxr-sr-x[/B] 2 root test 4096 Apr 30 00:59 dir1
Is there some way to change the default umask when logging in with a user using an sftp client? I tried changing the default umask by setting it in "/etc/profile", but that didn't work.
Why can I create directories multiple levels deep using the console, but not using the dropbear sftp method?
Zuletzt bearbeitet: