LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-08-2017, 11:43 AM   #1
massageguy
LQ Newbie
 
Registered: May 2017
Location: Manhchester, UK
Distribution: Linux Mint 17.3 and 18.2
Posts: 8

Rep: Reputation: Disabled
Red face Cannot get rid of unwanted locked folder/directory


My first post, and I'm definitely new to Linux.
My arrangement is this: I have a Toshiba Satellite L500 laptop (old as the hills, I know) running Mint 17.3, a Packard Bell dot s Netbook running Mint 18.2 both of which are connected to my NAS drive for centralised storage of all files. The three items are networked so that I can work on which is most convenient at the time (Toshiba at home and PB on the move).
Initially, I backed up only my documents folder from the NAS to the Toshiba (laptop) using the Backup Tool loaded with Mint 17.3. It worked fine, but (there's always a but), I later decided that I needed something less basic so that I could synch updated files automatically. Rsync (using Grsync) gave me what I needed as this allows individual backups to be accessed (Backup Tool locked folders, as far as I could tell) if necessary.
Anyway I backed up all files from the NAS to the laptop, but, ran out of space before it finished because of the previously executed backup. It took me an age to work out how to delete the files and folders from the old backup to give me the space to let the new backup complete. Eventually, I was able to clear the old backup folder, having checked that everything was okay with the new one first.
But (remember them?), one folder stuck and I cannot get rid of it! Whatever I try (don't know that much anyway) it will not go. I consistently get "There was an error deleting .mintbackup. blah, blah, : Permission denied".
Although the folder is doing no harm just sitting there in my Home folder, it would be nice to, a) find out why, and, b) get rid as it's annoying me.
As I said before, I'm new to both Linux and this forum, so please be gentle with me.
PS, I have a few hundred (thousand?) more questions to ask, yet!

Last edited by massageguy; 09-08-2017 at 11:47 AM. Reason: Added a PS
 
Old 09-08-2017, 03:06 PM   #2
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
Hello, and a big WELCOME to LQ!!!
Please, never feel bad about asking anything on LQ!!!
Even IF some answer needs 'thick skin' to read, like:
lmgtfy rtfm (f=fine) faq rules guidance etc etc

In this case, check the owner and permissions='mode' on that 'stuck' directory, for which I'll use the name 'it', below.
I'll assume you can somehow get to a shell prompt, in a terminal. (My CLI 'Heaven')
(IF not, feel free to ask!!! Always!!!)
Code:
ls -ld it; df it; sudo rmdir it
You can use CODE tags around posted info (see BB code link at bottom of page.
Or you could try this &post termbin link: (cmd1;cmd2;...) | nc termbin.com 9999
(huge 'extra credit' IF you figure out: parenthesis semicolon pipe shell syntax)

IF you like .pdf onlne eBook reading, I can send you some links.

Best wishes!!! Looking forward to hearing back from you!!!

p.s. How do you 'mount'/access that NAS, while you "move"?

Last edited by !!!; 09-08-2017 at 03:29 PM.
 
Old 09-08-2017, 05:09 PM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,137

Rep: Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855
if you can't remove it with root permisions boot from a live medium ( CD ) and you should be able to delete it easily, good luck an welcome to the forums
 
Old 09-10-2017, 04:28 AM   #4
massageguy
LQ Newbie
 
Registered: May 2017
Location: Manhchester, UK
Distribution: Linux Mint 17.3 and 18.2
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by !!! View Post
Hello, and a big WELCOME to LQ!!!
Please, never feel bad about asking anything on LQ!!!
Even IF some answer needs 'thick skin' to read, like:
lmgtfy rtfm (f=fine) faq rules guidance etc etc
Thanks for greetings and I won't hesitate to ask, however, I will try to understand before I ask...hence the delay replying.

Quote:
In this case, check the owner and permissions='mode' on that 'stuck' directory, for which I'll use the name 'it', below.
I'll assume you can somehow get to a shell prompt, in a terminal. (My CLI 'Heaven')
(IF not, feel free to ask!!! Always!!!)
Code:
ls -ld it; df it; sudo rmdir it
Using this line gave me 'rmdir: failed to remove 'it' (no I didn't use 'it'): Directory not empty'. It sure looked it. I worked out how to view hidden files and found one called .mintbackup... which I tried a simple delete on and that didn't work. It looks like I have get rid of this first. When I checked the properties/permissions everything was greyed out and told me I was 'not the owner, so cannot change these permissions.'

So, now the question is "who is, and how do I get permission?

Quote:
You can use CODE tags around posted info (see BB code link at bottom of page.
Or you could try this &post termbin link: (cmd1;cmd2;...) | nc termbin.com 9999
(huge 'extra credit' IF you figure out: parenthesis semicolon pipe shell syntax)
I'm not going there just yet!!!

Quote:
IF you like .pdf onlne eBook reading, I can send you some links.
Not too techy please.

Quote:
Best wishes!!! Looking forward to hearing back from you!!!

p.s. How do you 'mount'/access that NAS, while you "move"?
The truth is I don't mount it. I simply put the files I might need in Dropbox. Pictures from my camera and phone do however go directly to the NAS via WD Photos and My Cloud and are thus backed up instantly. I have to file them properly when at home, though.

Thanks for your help!
 
Old 09-10-2017, 04:32 AM   #5
massageguy
LQ Newbie
 
Registered: May 2017
Location: Manhchester, UK
Distribution: Linux Mint 17.3 and 18.2
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Keith Hedger View Post
if you can't remove it with root permisions boot from a live medium ( CD ) and you should be able to delete it easily, good luck an welcome to the forums
Thanks for the welcome. I'm sorry to say that I have no idea how to do this!
 
Old 09-10-2017, 04:55 AM   #6
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
Quote:
Originally Posted by massageguy View Post
Thanks for the welcome. I'm sorry to say that I have no idea how to do this!
ouch. very basic stuff.
please take the time to review these search results:
https://duckduckgo.com/?q=linux+how+to+become+root
if you still have questions afterwards i'll be happy to help.
 
1 members found this post helpful.
Old 09-10-2017, 06:14 AM   #7
massageguy
LQ Newbie
 
Registered: May 2017
Location: Manhchester, UK
Distribution: Linux Mint 17.3 and 18.2
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
ouch. very basic stuff.
please take the time to review these search results:
https://duckduckgo.com/?q=linux+how+to+become+root
if you still have questions afterwards i'll be happy to help.
Thanks for your help! I checked it out and got root in the terminal but, the suggested command given still didn't let me delete the culprit file.
 
Old 09-10-2017, 06:54 AM   #8
dave@burn-it.co.uk
Member
 
Registered: Sep 2011
Distribution: Puppy
Posts: 601

Rep: Reputation: 172Reputation: 172
How big is the file?? I seem to remember that there is a certain situation where an entry exists in the directory for a file that does not actually exist and therefore cannot be deleted. I think if that is the case you just have to live with it, though I would try creating a file with the same name and see what happens - it just might kick it into behaving.
 
Old 09-10-2017, 07:07 AM   #9
massageguy
LQ Newbie
 
Registered: May 2017
Location: Manhchester, UK
Distribution: Linux Mint 17.3 and 18.2
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dave@burn-it.co.uk View Post
How big is the file?? I seem to remember that there is a certain situation where an entry exists in the directory for a file that does not actually exist and therefore cannot be deleted. I think if that is the case you just have to live with it, though I would try creating a file with the same name and see what happens - it just might kick it into behaving.
The files is quite small at 119 bytes, so there must be something there.
 
Old 09-10-2017, 08:47 AM   #10
massageguy
LQ Newbie
 
Registered: May 2017
Location: Manhchester, UK
Distribution: Linux Mint 17.3 and 18.2
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by !!! View Post
p.s. How do you 'mount'/access that NAS, while you "move"?
This question gave me a mind to check if there is another way to access my files "on the move" directly. It turned out there is!!! I'm not certain I like it much because the website site involved (although it is owned and run by WD) came with browser warnings about it not being secure (not https). I had to over-ride this making a 'security exception' to be able to access my NAS.

Setting up was relatively painless and with the 'exception' in place, easy to access. However, I think I would prefer to be a little suspicious and avoid using this method because of that security thing bearing in mind it's all rather private. Actually, I think I might get rid of that exception as well, and stick with Dropbox.

Thank you for that question !!! it made 'a moment of greater interest'. D
 
Old 09-10-2017, 01:53 PM   #11
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
Quote:
Originally Posted by massageguy View Post
Thanks for your help! I checked it out and got root in the terminal but, the suggested command given still didn't let me delete the culprit file.
please show us.
full commands issued, full output received.
 
Old 09-10-2017, 02:32 PM   #12
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
I forgot to mention: rmdir only works IF it is empty.
I was afraid to mention: rm -rf switches, because they can easily accidentally wipe-out a whole system!!! But -i will give you a chance to think first. man

There's new https:// tricks that Idk, so I maybe lost as to what you are doing!!!
Actually, it maybe just a web-app, that has nothing to do with Linux!!!
Can you access 'it' from the cli? ls -al it
Don't be scared: ls -la it | nc termbin.com 9999
Even this crazy idea might uncover a clue, as to what's going on:
cd it; df .* | nc ... (leave off the pipe netcat ..., to look at it first)
p.s. WebSearch: shell pipe brief simple basic tutorial

Yes, specific details 'rule' "Something did something" freaks people out!!!

Last edited by !!!; 09-10-2017 at 03:18 PM.
 
Old 09-11-2017, 11:41 AM   #13
massageguy
LQ Newbie
 
Registered: May 2017
Location: Manhchester, UK
Distribution: Linux Mint 17.3 and 18.2
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by !!! View Post
I forgot to mention: rmdir only works IF it is empty.
I was afraid to mention: rm -rf switches, because they can easily accidentally wipe-out a whole system!!! But -i will give you a chance to think first. man
I think I'll give that a miss for the moment

Quote:
There's new https:// tricks that Idk, so I maybe lost as to what you are doing!!!
Actually, it maybe just a web-app, that has nothing to do with Linux!!!
I think you are correct as this happens entirely on-line in the browser...you can, however, download any of the files that are visible. And, upload any that have been changed.

Quote:
Can you access 'it' from the cli? ls -al it
This worked and gave me some info that I have yet to understand
Code:
total 12
drwxr-xr-x  2 root   root   4096 date/time.
drwxr-xr-x 39 myname myname 4096 date/time..
-rw-r--r--  1 root   root    119 date/time and filename
Quote:
Don't be scared: ls -la it | nc termbin.com 9999
I haven't done this next bit as I don't if I'm supposed to, having got the above?
 
Old 09-13-2017, 04:46 AM   #14
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,348

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Can you show the actual output of these cmds please; it could be important.
Code:
pwd
ls -al

lsattr

ls -lZ
Thanks
 
Old 09-13-2017, 05:19 AM   #15
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,141

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
I guess you can also post the output of the command below:

ls -ld directory

It will tell you whether you have the permissions or not
 
  


Reply

Tags
backups, delete, folders, permissions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to get rid of Unwanted Launcher from National Weather Service pizzipie Linux - General 4 01-27-2017 06:35 AM
Like to get rid unwanted compiler/linker output fsshl Programming 1 07-18-2011 03:11 PM
How do I get rid of unwanted lines without grep -v in BASH pobrika Programming 7 06-10-2009 04:48 AM
URPMI Database Locked error, cant get rid of it. Nauntilus Linux - Software 3 05-17-2006 12:00 PM
How do I get rid of unwanted programs Mathias Cervantes Fedora 2 10-23-2005 10:08 AM

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

All times are GMT -5. The time now is 06:30 AM.

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