Cannot get rid of unwanted locked folder/directory
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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"?
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,137
Rep:
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
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.
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!
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.
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.
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
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!!!
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.