2
I messed with file permissions on my NAS - My Book Live - which runs on Debian Lenny. Now, every file I make is set executable by default. This happens only on the machine the NAS is mounted to. When I ssh to the NAS, newly created files are created correct...
This is how i mount the NAS:
sudo mount -t cifs //***/***/ /media/MyBookLive -o username=***,password=***,uid=1000,nobrl,iocharset=utf8,codepage=unicode,unicode
This is the output ls -l MyBookLive:/# ls -l total 328
drw-rw-r-x 50 root share 65536 Dec 26 06:40 APPS&GAMES
drw-rw-r-x 44 root share 65536 Jan 23 22:55 Downloads
drw-rw-r-x 15 root share 65536 Nov 21 09:44 KARAOKE
drw-rw-r-x 13 root share 65536 Nov 21 09:44 Rename
drw-rw-r-x 132 root share 65536 Jan 2 05:35 Shared Ebooks
drw-rw-r-x 281 root share 65536 Dec 7 14:34 Shared Music
drw-rw-r-x 7 root share 65536 Jan 22 04:20 Shared Pictures
drw-rw-r-x 6 root share 65536 Dec 31 05:55 Shared Videos
drw-rw-r-x 3 root share 65536 Jan 23 22:55 adas
-rw-rw-r-- 1 root share 0 Jan 24 08:29 blah
drw-rw-r-x 5 root share 65536 Nov 21 09:44 cfg
drw-rw-r-x 3 root share 65536 Jan 23 22:55 da
-rw-rw-r-- 1 root share 0 Jan 24 08:09 dasd
-rw-rw-rw- 1 root root 9 Jan 24 09:46 deckoff-ssh.txt
-rwxrw-r-- 1 root share 0 Jan 24 09:16 deckoff.txt
drw-rw-r-x 5 root share 65536 Nov 21 09:44 dev
-rw-rw-r-- 1 root share 1459629 Sep 20 12:26 libstdcpp5.tgz
-rw-rw-r-- 1 root share 2047803392 Sep 10 12:29 rootfs.img
-rw-rw-r-- 1 root share 345711 Sep 20 12:26 sp-auth.tgz
drw-rw-r-x 5 root share 65536 Nov 21 09:44 x40
deckoff-ssh.txt was created in terminal with nano, deckoff.txt was created with a client machine(Ubuntu 12.04), right click -> new file..
grep -v "#" /etc/samba/smb.conf
This is the output. (100% percent sure, I never touched the samba.conf file??)
[global]
workgroup = WORKGROUP
realm = WORKGROUP
netbios name = MyBookLive
server string = My Book Live Network Storage
include = /etc/samba/smb-global.conf
include = /etc/samba/smb-global_veto.conf
include = /etc/samba/overall_share
PS It seems that files created via ssh belong to root group, and created in client machine to share. Probably the settings for newly created files by members of share grop are to be executable? Files, which are marked as not executable in terminal, are treated as executable by the machine...
You are showing a list of directories. Directories need to be executable in order for a user to be able to
cd
into them. Are you sure there is a problem here? Please post anls -l
output that includes normal files. – terdon – 2013-01-24T17:40:40.277ls output was edited. Compare deckoff.txt and deckoff-ssh.txt. – deckoff – 2013-01-24T17:49:07.050
OK, could you also post the output of
grep -v "#" /etc/samba/smb.conf
on the NAS? You are probably setting the permissions there. – terdon – 2013-01-24T18:02:04.150When you say "you messed with the permissions" what file did you modify?
fstab
on the client? – terdon – 2013-01-24T18:08:33.577No, I actually mount the drive via script /ect/network/if-up.d/MBL I messed with NAS itself, created a user and so On. I re-flashed the firmware of the NAS, which returned the NAS factory defaults, but still the problem persists. I have 3 PC which mount the NAS simultaneously.... I will umount all, restart and mount one by one and see what happens – deckoff – 2013-01-24T18:15:17.000
Umm... I still don't understand how you "played with the permissions". Creating a user on the NAS should not affect this. What happens if you login as that user using ssh and create a file? – terdon – 2013-01-24T18:20:21.087
deckoff-ssh.txt was done that way :) it is OK,(not executable,) as you can see :) – deckoff – 2013-01-24T18:34:09.173