Page 1 of 1

[SOLVED] Mint 19 - Cannot delete directories in shared directory

Posted: Mon Jul 09, 2018 7:34 am
by scissorsneedfoodtoo
Hi all. I recently did a fresh install of Linux Mint 19 Cinnamon on both my laptop and desktop, and got shared folders working between them. Just about everything with the shared folders is working as expected.

However, I noticed recently that I am not able to delete any non-empty folders within the shares. For example, I am sharing my desktop's Download folder, and in it is a folder "Test" that contains a text file. When I mount the desktop's Download directory on my laptop I'm able to create new files and folder, and delete files and empty folders. When I try to delete the file "Test", I get a message saying that it can't be moved to the trash, I click delete, and it seems to have been deleted. But when I refresh Nemo the file is still there, along with the text file inside. My workaround so far has been to delete all the files within a folder, then delete the folder itself, though it's a bit of a pain.

Does anyone else have this issue? Is there an easy way to solve this? Also I should mention that I tried a live USB on my laptop to make sure it wasn't an issue with my install. Still have the same issue mounting the desktop's Download folder and trying to delete non-empty folders within it, even in a live environment.

Here's the result of testparm -s from my laptop:

Code: Select all

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
WARNING: The 'netbios name' is too long (max. 15 chars).

Server role: ROLE_STANDALONE

# Global parameters
[global]
	dns proxy = No
	log file = /var/log/samba/log.%m
	map to guest = Bad User
	max log size = 1000
	obey pam restrictions = Yes
	pam password change = Yes
	panic action = /usr/share/samba/panic-action %d
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	passwd program = /usr/bin/passwd %u
	server role = standalone server
	server string = %h server (Samba, Ubuntu)
	syslog = 0
	unix password sync = Yes
	usershare allow guests = Yes
	idmap config * : backend = tdb


[printers]
	browseable = No
	comment = All Printers
	create mask = 0700
	path = /var/spool/samba
	printable = Yes


[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers
The output of testparm -s from my desktop is the same except for the error about the hostname being too long.

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Mon Jul 09, 2018 7:55 am
by altair4
Please post the output of this command from the Desktop machine:

Code: Select all

net usershare info --long
Side note: Don't worry about the 'netbios name' is too long error as that pertains only to samba networking with Windows not between Linux machines.

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Mon Jul 09, 2018 8:01 am
by scissorsneedfoodtoo
Hi altair4, thank you for the quick response.

Here's the output of that command from the desktop:

Code: Select all

[Music 2]
path=/media/kris/Seagate Backup Plus Drive/Music 2
comment=
usershare_acl=Everyone:F,
guest_ok=n

[Movies 2]
path=/media/kris/Seagate Backup Plus Drive/Movies 2
comment=
usershare_acl=Everyone:F,
guest_ok=n

[Pictures 2]
path=/media/kris/Seagate Backup Plus Drive/Pictures 2
comment=
usershare_acl=Everyone:F,
guest_ok=n

[Backups]
path=/media/kris/Seagate Backup Plus Drive/Backups
comment=
usershare_acl=Everyone:F,
guest_ok=n

[Downloads]
path=/home/kris/Downloads
comment=
usershare_acl=Everyone:F,
guest_ok=n

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Mon Jul 09, 2018 8:12 am
by altair4
Your [Downloads] share requires credentials to access. Are you accessing this share from the client as "kris" or by some other user name?

If you are accessing it by someone other than kris you might want to make them look like kris by:

** Editing /etc/samba/smb.conf

** Right under the workgroup = WORKGROUP line add this one:

Code: Select all

force user = kris
** Save the file then restart smbd:

Code: Select all

sudo service smbd restart

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Mon Jul 09, 2018 8:31 am
by scissorsneedfoodtoo
Yes, I'm accessing the share as "kris" from the client. Actually, that's my username/credentials on both my laptop and desktop haha. Not sure if that's causing the issue here, but it wasn't a problem in 18.3.

I went ahead and added that line to /etc/samba/smb.conf on my desktop. Also added it to the file on my laptop for good measure, since I bounce between the two. Restarted smbd with that command, but still have the same issue.

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Mon Jul 09, 2018 8:34 am
by altair4
I cannot reproduce your symptom.

What are the permissions of the "test" file and it's parent folder:

Code: Select all

ls -al /home/kris/Downloads/Test

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Mon Jul 09, 2018 8:50 am
by scissorsneedfoodtoo
Thank you for your continued support, altair4.

Here's the output of ls -al /home/kris/Downloads/Test on the Desktop when I ssh in:

Code: Select all

total 8
drwxr-xr-x 2 kris kris 4096 Jul  9 21:18 .
drwxrwxrwx 3 kris kris 4096 Jul  9 21:46 ..
-rwxr--r-- 1 kris kris    0 Jul  9 21:18 testtest
I should note that the [Test] folder and "testtest" file were created when I mounted the [Download] share in Nemo.

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Mon Jul 09, 2018 8:57 am
by altair4
I have no idea.

I have reproduced your share, the Test subfolder, and the testtest file on a Mint19 Cinnamon system ( VBox ) but I cannot reproduce your symptom. Sending a populated subfolder to the trash works as it should.

Um ... my client is Xubuntu 18.04 however .... let me see if I can do this Mint19 to Mint19. This will take a bit.

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Mon Jul 09, 2018 9:00 am
by scissorsneedfoodtoo
Thank you so much again for your support! I'll do some further testing on my end, too. I just noticed it recently, so I might do some backups and fresh installs on both machines and see if I can reproduce this issue.

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Mon Jul 09, 2018 9:11 am
by altair4
And there it is.

When I access the share from Xubuntu everything is normal.

When I access it from Nemo on another Mint19 Cinnamon machine it does exactly what you said it did.

When I install Thunar ( XFCE's file manager ) on the Mint19 Cinnamon client machine and access the share through that everything is normal again.

I'm not the shiniest apple in the bushel but me thinks there be a bug in Nemo.

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Mon Jul 09, 2018 9:37 am
by scissorsneedfoodtoo
Hah! I would say you're pretty dang shiny. Didn't even think to test another file manager.

I can't thank you enough for your support--I really appreciate it. I'll install Thunar for now and will see about letting the Mint team know about the bug with Nemo.

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Mon Jul 09, 2018 11:50 am
by altair4
I have an alternative that does not invlove using something other than Nemo if you are interested.

I added a line in /etc/fstab of the Mint19 Cinnamon client:

Code: Select all

//vmint19cinn.local/downloads /home/mint/Samba cifs username=tester,password=testerpw,uid=999,nounix.noauto,user 0 0
Because the mount point ( which I created as Samba ) is in my home folder that line will automatically create a launch icon on the side panel of Nemo. Upon selection it will go to fstab to find out how to mount it:

uid=999 is the uid of the dummy mint user when used in a Live session from the iso. Your uid is most likely 1000.
noauto makes it so that it will not mount at boot but on demand.
user allows an ordinary user the ability to mount the share without being root ( sudo ).

Once mounted I can delete a populated subfolder.

When you mount something from Nemo normally it uses gvfs. But so does Thunar. Mounting it this way through fstab mounts it with cifs. So the bug appears to be Nemo + gvfs not Nemo alone.

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Wed Jul 11, 2018 11:08 pm
by scissorsneedfoodtoo
Thank you for that alternative method altair4. I haven't had time to test it yet, but will do so soon and report back.

Just a quick question, are those username and password fields in that line are my Samba user credentials? Will play around with that and remember to change the uid to 1000 and see how it goes.

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Thu Jul 12, 2018 7:17 am
by altair4
Yes. Those are the samba username and password required to access the other machine in your network.

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Tue Aug 28, 2018 4:03 pm
by rockadile
Just wanted to drop a note to say I am experiencing the same issue. I upgraded my Virtualbox install of Linux Mint 18 to Linux Mint 19 and I am unable to delete folders on a shared network drive via Nemo. The UI shows it get deleted but if I refresh the folder, it is still there.

Re: Mint 19 - Cannot delete directories in shared directory

Posted: Tue Aug 28, 2018 4:18 pm
by altair4
If it makes you feel any better there is now a bug report for this that references this very thread: Deleting non-empty folder in SMB-CIFS (SAMBA) fails #1930

While you wait I would suggest the alternatives mentioned above:

** Use Thunar as your file manager - I'm sure there are others but it's the only one I tested.

** Use a CIFS mount.