Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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??)

  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...

share|improve this question
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 an ls -l output that includes normal files. – terdon Jan 24 '13 at 17:40
ls output was edited. Compare deckoff.txt and deckoff-ssh.txt. – deckoff Jan 24 '13 at 17:49
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 Jan 24 '13 at 18:02
When you say "you messed with the permissions" what file did you modify? fstab on the client? – terdon Jan 24 '13 at 18:08
No, 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 Jan 24 '13 at 18:15
up vote 1 down vote accepted

I'm going to reiterate what terdon said. You are showing a list of directories. They need to be executable or you cant go into them. See here For a better explanation of it.

Now, if your files (the entries that don't start with d) are doing this there are other things to consider, like umask, but for now everything looks good to go

share|improve this answer
Thank you for answering. The problem I was trying to solve quite different, I just thought that was the cause for it. I should have described the problem itslef. Thank you. – deckoff Sep 6 '13 at 6:22
No prooblem. Post it up and we'll have a run at it too – PsychoData Sep 6 '13 at 20:44
I re-installed the machine :) – deckoff Sep 8 '13 at 18:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.