UPDATE: It seems like the problem was caused because of another service which had nothing to do with smb. Apologies for not having a proper resolution and I am just closing the issue.
I have mounted a share with SMB to an Ubuntu 17.10 VM and I am trying to delete a file from the mount location (
I have first did the mount as guest:
sudo mount -t cifs //ipaddress/share /mnt/smb_mnt/ -oguest,vers=2.0 and as a
root too and none of it worked. Also, I tried the
mount -o remount,rw /mnt/smb_mnt to remount using read and write privileges but the file can still not be deleted.
I give the file 777 permissions and I execute the
rm command as
root which is also the owner of the file. I checked with
ls -l and the permissions are the ones I assign to both file and parent file (
I have tried to use
chattr -i command based on other related questions I have found but I get:
chattr: Permission denied while setting flags on /mnt/smb_mnt/file.
What else can I try to be able to achieve the deletion?
I know files can be deleted easily locally on the machine, but I need to delete the file from the mounted location because the module I want to test works only over smb so I can't just
ssh to the machine and delete the file manually.
Here is the SMB config file:
[global] # Include the base global configuration options. These don't usually change. include = /etc/samba/base_global.conf # These are configurable via the module max protocol = SMB2 hide files = //:2eDS_Store/:2eFBCLockFolder/.FBCLockFolder/:2eFBCIndex/.FBCIndex/TheVolumeSettingsFolder/TheFindByContentFolder/Temporary Items/Network Trash Folder/.AppleDB/:2eVolumeIcon.icns/.VolumeIcon.icns/Icon/.AppleDouble/.AppleDesktop/desktop.ini/RECYCLER// # (Options from the currently enabled Global Profile. Will overwrite any previous options) # Enabled Global profile: Default Global # Authentication is handled by the UserDirectory module. # The "security" option is put in this file as well. include = /etc/samba/auth.conf [Space] # Profile: Guest Read/Write path = /share/Space guest ok = True read only = False browseable = True preexec = /opt/space/modules/SMB/bin/scripts/event.py --event connect --profile 105 --service %S --user %u --client-ip %I --server-ip %i --path %P --pid %d root preexec = /opt/space/modules/SMB/bin/scripts/event.py --root --event connect --profile 105 --service %S --user %u --client-ip %I --server-ip %i --path %P --pid %d postexec = /opt/space/modules/SMB/bin/scripts/event.py --event disconnect --profile 105 --service %S --user %u --client-ip %I --server-ip %i --path %P --pid %d # Optional extra definitions created by other programs. # Will scan /etc/samba/includes.d/ for extra configuation files as well # A SMB.createConf() will need to be run for it to detect new SMB config files # The first line (includes.conf) is included for backwards compatibility. Modules should use the includes.d folder and make their own files. include = /etc/samba/includes.conf