1

I run SAMBA 4.9.5 on my raspberry pi 4 and share a folder on my external hard drive(exfat as fs).
It worked all fine until I want to remotely delete or modify files on it.
I cannot delete anything from my windows pc, mac and iPhone. Nothing works. Deleting and modifying files on my boot drive works just fine. The only thing I can do is browse, create a file, change the content but when I want to rename the file or delete it I get an error saying that the requested operation is not supported.

I checked my HDD for any errors on windows but the drive is all fine.

My smb.conf

[global]
netbios name = RaspNAS
server string = NAS Server fuer
server role = standalone server
#min protocol = SMB2
max protocol = SMB3
#client min protocol = SMB2
client max protocol = SMB3
#server min protocol = SMB2
server max protocol = SMB3
ea support = yes
vfs objects = catia fruit streams_xattr  
fruit:metadata = stream
fruit:model = MacSamba
fruit:posix_rename = yes 
fruit:veto_appledouble = no
fruit:wipe_intentionally_left_blank_rfork = yes 
fruit:delete_empty_adfiles = yes
wins support = yes
read raw = yes
write raw = yes
log file = /etc/samba/log
encrypt passwords = yes

[HOMEPI]
path = /
comment = PI
browsable = yes
read only = no
writable = yes
Guest ok = no
force group = nas
valid users = pi
inherit owner = yes
create mask = 777
directory mask = 777
force create mode = 777
force directory mode = 777
force user = root
dos filemode = yes
store dos attributes = yes


[Mert]
path = /media/Merts-HDD/NAS/Mert
comment = Merts-NAS
browsable = yes
read only = no
writable = yes
Guest ok = no
valid users = mert pi
create mask = 777
directory mask = 777
force create mode = 777
force directory mode = 777
force user = pi
force group = nas
dos filemode = yes
store dos attributes = yes

I tried almost anything but nothing worked for me. I even edited the fstab file and rebooted like 20-30 times no results.

FSTAB entry:

/dev/sda1  /media/Merts-HDD/    exfat  auto,nofail,noatime,rw,umask=0 0 0

EDIT:

FSTAB entry looks like this:

/dev/sda1  /media/Merts-HDD/    exfat  defaults,nofail,noatime,async,rw,uid=1000,gid=1005,umask=000 0 0
4
  • What about the ownership and permissions of the exfat file system? Maybe the remote user via Samba lacks some permissions. -- I'm using ssh for remote access, and I think it is easier to manage, but I hope that someone who knows Samba can help you. -- Otherwise, maybe, you can consider using ssh (install openssh-server in the remote computer) and some ssh client to connect from the local computer. In Windows you can use for example Filezilla or WinSCP..
    – sudodus
    Jan 2, 2020 at 19:16
  • @sudodus The ownership of every file in exfat is root. I run 'chmod -Rf 777 /…/DIR' Jan 2, 2020 at 19:39
  • 2
    You can't change the ownership and permissions of directories and files in Linux using chown and chmod for Microsoft file systems. You must mount or remount with the correct ownership and permissions. See this link (and the link from it).
    – sudodus
    Jan 2, 2020 at 19:46
  • 1
    You were right I guess I checked the ownership and permission of each files. The one that are located on the boot drive and the external drive. Both have different permissions. External: imgur.com/YSgvh9J Boot: imgur.com/UJ3BiOG - Now I mounted it the way it should be but it doesn't fix it: imgur.com/j5ta6I2. The problem remains. Jan 3, 2020 at 1:10

3 Answers 3

2

I think you're focused on the wrong thing. Your fstab entry is likely fine. Also, rebooting 20-30 times will not magically fix it on the 23rd reboot. :)

Can you login using a terminal and mv or rm files? If so, then the issue is with the samba config. If not, then something with permissions, or maybe then look into the way it is mounted.

7
  • Of course it does not affect anything rebooting it :) But I reboot it because I edited fstab a couple of times and rebooted it to test the new settings I made. I move the files just fine on the GUI of Raspbian and via terminal. So it must be something with samba. But shouldn't the error be "not permitted" or "not allowed" instead of "operation is not supported" Jan 2, 2020 at 19:41
  • 1
    I'm not sure whether the error should read exactly, "not permitted", or "operation is not supported"... Doesn't really matter, though. Now that you know it's samba, you can focus on that. What directory are you having trouble renaming files in? The Mert share or the HOMEPI share?
    – jeremyk
    Jan 2, 2020 at 21:30
  • 1
    The Mert share obviously because it is where the problem is because of the mounted drive located in /media/Merts-HDD/NAS folder. Jan 2, 2020 at 23:24
  • Your samba config is forcing user "pi" and group "nas" ... Can you make sure the "pi" user and "nas" group have permissions to rename/delete files in /media/Merts-HDD/NAS/Mert? What is the output of, ls -l /media/Merts-HDD/NAS/Mert?
    – jeremyk
    Jan 3, 2020 at 18:43
  • No, I solved it already. The drive is mounted correct. But the fruit options in smb.conf messed everything up. Jan 3, 2020 at 19:11
1

I solved it by just removing the fruit options in the smb.conf file.

In the most cases less is more I guess.

Still I want to thank @jeremyk and @sudodus for your time and effort you put in this case.

1

I had the same issue as you. Solution was to remove the streams_xattr from the Samba configuration. In fact, the documentation for this module clearly states that it is supposed to work with NTFS-formatted drives.

Quote: "The file system that is shared with this module enabled must support xattrs." https://www.samba.org/samba/docs/current/man-html/vfs_streams_xattr.8.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .