LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-19-2017, 08:44 PM   #1
tyw7
LQ Newbie
 
Registered: Nov 2017
Posts: 20

Rep: Reputation: 0
Question Cannot delete directory after mounted via FSTAB


I have mounted a NAS file via FSTAB and I changed the password to my NAS drive. However, I cannot delete the folder that FSTAB created.

Deleting through the user interface said "no such directory or file." I cannot do rmdir via terminal too.

I have Linux Mint.
 
Old 11-20-2017, 12:37 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
to my knowledge, fstab entries do not create folders.
please show us some output.
 
Old 11-20-2017, 05:30 AM   #3
giis
Member
 
Registered: Nov 2013
Location: Third Rock from Moon
Distribution: RPM/DEB based and LFS
Posts: 73

Rep: Reputation: Disabled
Quote:
Originally Posted by tyw7 View Post
However, I cannot delete the folder that FSTAB created.

Deleting through the user interface said "no such directory or file." I cannot do rmdir via terminal too.
Please share more details like output `cat /etc/fstab` and rm -rf command along with error message. That will help to understand your issue better.
 
Old 11-20-2017, 06:14 AM   #4
tyw7
LQ Newbie
 
Registered: Nov 2017
Posts: 20

Original Poster
Rep: Reputation: 0
I think I used gvfs too but I forgot what I did.

For fstab I did something like
192.168.0.1:/NASShare /mnt/NAS nfs username=administrator,password=pass 0 0
 
Old 11-20-2017, 06:17 AM   #5
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by giis View Post
Please share more details like output `cat /etc/fstab` and rm -rf command
Be cautious with rm -rf command!
Run it only if you really knows what are you doing

Last edited by Teufel; 11-20-2017 at 06:18 AM.
 
1 members found this post helpful.
Old 11-20-2017, 06:26 AM   #6
tyw7
LQ Newbie
 
Registered: Nov 2017
Posts: 20

Original Poster
Rep: Reputation: 0
I used rmdir as it's a folder. According to permissions, it is owned by root but I cannot delete it even if I elevate the Nautilus to root status. RMDIR said resource is busy.

Where can I check GVFS entries? I think I might have created one.
 
Old 11-20-2017, 06:31 AM   #7
giis
Member
 
Registered: Nov 2013
Location: Third Rock from Moon
Distribution: RPM/DEB based and LFS
Posts: 73

Rep: Reputation: Disabled
Quote:
Originally Posted by tyw7 View Post
I used rmdir as it's a folder. According to permissions, it is owned by root but I cannot delete it even if I elevate the Nautilus to root status. RMDIR said resource is busy.
Is this nfs export itself has correct permission? Try this example:

Quote:
touch /mnt/NAS/dummyfile
rm /mnt/NAS/dummyfile
Did these two commands worked ?
 
Old 11-20-2017, 06:32 AM   #8
giis
Member
 
Registered: Nov 2013
Location: Third Rock from Moon
Distribution: RPM/DEB based and LFS
Posts: 73

Rep: Reputation: Disabled
Quote:
RMDIR said resource is busy.
Also, can you try with commands like fuser or lsof to find out which process is using those directory?
 
Old 11-20-2017, 06:33 AM   #9
tyw7
LQ Newbie
 
Registered: Nov 2017
Posts: 20

Original Poster
Rep: Reputation: 0
Keeps saying permission is denied. It's a folder on the Desktop.
 
Old 11-20-2017, 06:34 AM   #10
tyw7
LQ Newbie
 
Registered: Nov 2017
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by giis View Post
Also, can you try with commands like fuser or lsof to find out which process is using those directory?
tyw7@HPp6792uk ~/Desktop $ sudo lsof NAS
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
automount 1783 root 10r DIR 0,49 0 22424 NAS
 
Old 11-20-2017, 06:35 AM   #11
giis
Member
 
Registered: Nov 2013
Location: Third Rock from Moon
Distribution: RPM/DEB based and LFS
Posts: 73

Rep: Reputation: Disabled
Please post the command along with its error message from your terminal. It can give us more hints.
Edit: I thought NAS was mounted on /mnt/NAS but you are accessing it from ~/Desktop/NAS ?

Last edited by giis; 11-20-2017 at 06:37 AM.
 
Old 11-20-2017, 06:42 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,759

Rep: Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930
What directory are you trying to delete?

nfs does not use username/password and /etc/fstab is separate from mounting using nautilus/gvfs.


I assume the folder is the shortcut to the nfs share. Have you tried right clicking on the icon and selecting unmount?
 
Old 11-20-2017, 06:43 AM   #13
tyw7
LQ Newbie
 
Registered: Nov 2017
Posts: 20

Original Poster
Rep: Reputation: 0
I found an entry under auto.sambashares and auto.masters. Commenting it out and rebooting.

Edit: I also uninstalled cifs-utils and automount and the folder disappeared.

Last edited by tyw7; 11-20-2017 at 06:44 AM.
 
Old 11-20-2017, 06:50 AM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,759

Rep: Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930
auto.master and auto.sambashares is used by autofs and auto.sambashares would imply your mounting CIFS shares which is different then nfs.

Without knowing more information those could be sample configuration files which you are not using.
 
Old 11-20-2017, 06:51 AM   #15
tyw7
LQ Newbie
 
Registered: Nov 2017
Posts: 20

Original Poster
Rep: Reputation: 0
I deleted the entries in the folder pertaining to my NFA and uninstalled the program. Then the offending entry is gone.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Samba not mounted in fstab? NotAComputerGuy Linux - Networking 12 07-09-2013 04:07 AM
windows shares do not staying mounted via fstab dodgefan Linux - Networking 5 02-13-2012 05:27 AM
directory permissions on mounted smb share in fstab glok_twen Linux - Server 2 02-18-2008 06:13 AM
No /ect/fstab -how do I have a partition mounted? tnrooster Fedora 4 06-13-2007 12:17 AM
Network fstab entries not being mounted at boot tisource Linux - Networking 4 12-26-2005 10:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration