Unable to delete file with fstab mounted SMB shares

Hi, it works for me, I mean I could mount my NAS using your instructions but I have a problem, I can read, modfy and create files but I can’t delete files. Here is my fstab, any idea?

//192.168.1.132/Peliculas /mnt/pelis cifs x-systemd.automount,noauto,rw,iocharset=utf8,username=admin,password=pepe,uid=osmc,gid=osmc,file_mode=0777,dir_mode=0777 0 0

I created a new topic for you as the Wiki article isn’t really the correct place to ask for help.

What type of NAS do you have? How is the drive(s) formatted? It’s possible that it’s a permissions problem on the actual filesystem on the NAS.

Of course, logs always help!

Hi Brian, thanks for your answer.

The NAS is a Wester Digital My Cloud 4Tb, here a link:

In fact I think that is a permission problem but I don´t understand excactly what is. I’m using the user “admin” in fstab that have WR access (I checked entering with the same user through Windows and deleting a file)

The filesystem is ext4:

PPB-Storage:/# df -Th
Filesystem Type Size Used Avail Use% Mounted on
rootfs rootfs 1.9G 643M 1.2G 36% /
/dev/root ext3 1.9G 643M 1.2G 36% /
tmpfs tmpfs 40M 4.0M 36M 10% /run
tmpfs tmpfs 40M 64K 40M 1% /run/lock
tmpfs tmpfs 10M 0 10M 0% /dev
tmpfs tmpfs 5.0M 0 5.0M 0% /run/shm
tmpfs tmpfs 100M 9.5M 91M 10% /tmp
/dev/root ext3 1.9G 643M 1.2G 36% /var/log.hdd
ramlog-tmpfs tmpfs 40M 7.0M 34M 18% /var/log
/dev/sda4 ext4 3.6T 81G 3.5T 3% /DataVolume
/dev/sda4 ext4 3.6T 81G 3.5T 3% /CacheVolume
/dev/sda4 ext4 3.6T 81G 3.5T 3% /nfs/Public
/dev/sda4 ext4 3.6T 81G 3.5T 3% /nfs/Fotos
/dev/sda4 ext4 3.6T 81G 3.5T 3% /nfs/Pablo
/dev/sda4 ext4 3.6T 81G 3.5T 3% /nfs/Series
/dev/sda4 ext4 3.6T 81G 3.5T 3% /nfs/Peliculas
/dev/sda4 ext4 3.6T 81G 3.5T 3% /nfs/TimeMachineBackup
/dev/sda4 ext4 3.6T 81G 3.5T 3% /nfs/SmartWare
tmpfs tmpfs 1.0M 0 1.0M 0% /etc/samba/msg.sock

What kind of information could I bring to you to help me understand?

Thank you

I’ve had the same issue on my WD MyCloud…

It looks like you have SSH access to the WD, right? An

ls -l

on one of the directories that you are having the issue with would be a good place to start.

BTW, instead of using SMB you will get better performance it you use NFS :wink:

Hi Brian, I already tried to configure NFS, was my first option but I found that my WD doesn’t support it
I get this from the WD page:

  • NFS is not supported on single-bay My Cloud (firmware 04.xx.xx-xxx)

on the other hand, yes I have ssh access to the WD (root access), this is the result of ls:

PPB-Storage:/shares/Peliculas# ls -las
total 87580
8 drwxrwxrwx+ 9 root share 4096 Dec 31 16:31 .
4 drwxrwxr-x 12 root share 4096 Aug 21 2017 …
16 -rw-rwxr-x 1 nobody share 10244 Nov 11 2017 .DS_Store
4 drwxrwxr-x 3 root share 4096 Apr 15 2017 .wdmc
4 drwxr-xr-x 2 root root 4096 Dec 29 20:11 Avengers Infinity War (2018) [WEBRip] [1080p] [YTS.AM]
4 drwxr-xr-x 2 root root 4096 Dec 30 15:22 Eyes.Wide.Shut
4 drwxrwxr-x 3 nobody share 4096 Jul 20 2017 Game.of.Thrones.S07E01.WEB.h264-TBS[ettv]
4 drwxr-xr-x 2 root root 4096 Dec 30 13:08 John Wick Chapter 2 (2017) 1080p BrRip x264 - VPPV
4 drwxr-xr-x 2 root root 4096 Dec 29 20:17 Nymphomaniac 2013 Volume I & II UNRATED WEBRip XviD MP3-RARBG
4 drwxr-xr-x 2 root root 4096 Dec 30 13:02 Split.2016.1080p.BRRip.x264.AAC-ETRG
87524 -rwxrwxr-x 1 nobody share 89617017 Nov 19 2016 VID_20161119_222625282.mp4

thanks!

I find it hard to believe that NFS isn’t supported, as the files are in /nfs … It’s supported on my WD.

Anyhow,

There’s your problem, all the files are owned by root and you are using admin.

The easy fix would be:

chown -R admin /shares/Peliculas

Hi Brian, you were right, it works !

The strange thing was that Windows was working even without changing permission, seems like windows doesn’t check permission or something like that.

Thanks Brian!

I’m glad it worked for you. As to why Windows was working, I’m not sure as it’s the NAS the enforces the privileges.