-
- Expert
- Posts: 227
- Liked: 28 times
- Joined: Nov 12, 2014 9:40 am
- Full Name: John Johnson
- Contact:
can't change immutable flag to delete files from hard rep
hi all, we have a hardened rep on ubuntu.
I wanted to delete a couple of stale folders within the repo.
I went in and did "chattr -i" to remove the flag and then was able to delete the folder - no problem.
However with one of the folders this isn't working. I am in as root with a su shell.
When I run chattr -i it just gives me:
Usage: chattr [-pRVf] [-+=aAcC...
as if I'm typing it wrong or something.
I also try chown user * but that fails as well (I assume due to immutability?)
anyone have any tips for this linux noob?
thanks!
I wanted to delete a couple of stale folders within the repo.
I went in and did "chattr -i" to remove the flag and then was able to delete the folder - no problem.
However with one of the folders this isn't working. I am in as root with a su shell.
When I run chattr -i it just gives me:
Usage: chattr [-pRVf] [-+=aAcC...
as if I'm typing it wrong or something.
I also try chown user * but that fails as well (I assume due to immutability?)
anyone have any tips for this linux noob?
thanks!
-
- Veeam Legend
- Posts: 518
- Liked: 145 times
- Joined: Apr 22, 2022 12:14 pm
- Full Name: Danny de Heer
- Contact:
Re: can't change immutable flag to delete files from hard rep
Did you check if there is an open file handle ?
If so, the quickest way to unlock this is to reboot the server.
If so, the quickest way to unlock this is to reboot the server.
VMCE / Veeam Legend 2*
-
- Expert
- Posts: 227
- Liked: 28 times
- Joined: Nov 12, 2014 9:40 am
- Full Name: John Johnson
- Contact:
Re: can't change immutable flag to delete files from hard rep
Thanks! unfortunately this persists even immediately after a reboot.
-
- Veeam Legend
- Posts: 518
- Liked: 145 times
- Joined: Apr 22, 2022 12:14 pm
- Full Name: Danny de Heer
- Contact:
Re: can't change immutable flag to delete files from hard rep
Maybe you have a syntax issue somewhere, cant help you with that unfortunately.
Maybe try a different forum (something Linux) as this is not a Veeam issue per se.
Maybe try a different forum (something Linux) as this is not a Veeam issue per se.
VMCE / Veeam Legend 2*
-
- Service Provider
- Posts: 50
- Liked: 16 times
- Joined: Mar 22, 2021 11:37 am
- Full Name: Johnny Løberg
- Contact:
Re: can't change immutable flag to delete files from hard rep
Hi,
There's probably a "hidden" lock-file which is stopping you (.veeam.<number>.lock). This file needs to be specified to be affected.
To see all the existing files in current folder:
To remove immutable flags from *.vbk/*.vib/*.vbm:
To remove immutable flags from hidden files:
To remove *.vbk/*.vib/*.vbm:
To remove the hidden file(s):
So here's what I usually do (use tab to autocomplete filenames):
There's probably a "hidden" lock-file which is stopping you (.veeam.<number>.lock). This file needs to be specified to be affected.
To see all the existing files in current folder:
Code: Select all
ls -lah
Code: Select all
chattr -i *.*
Code: Select all
chattr -i <filename>
Code: Select all
rm *.*
Code: Select all
rm <filename>
Code: Select all
chattr -i *.*
chattr -i .veeam.<number>.lock
rm *.*
rm .veeam.<number>.lock
-
- Expert
- Posts: 227
- Liked: 28 times
- Joined: Nov 12, 2014 9:40 am
- Full Name: John Johnson
- Contact:
Re: can't change immutable flag to delete files from hard rep
Thanks all, but no - not the case.
It's not like there is some crazy complex syntax going on here lol... can only type chattr -i so many times incorrectly and I've done it a thousand or so times, including with a couple colleagues to make sure I wasn't going crazy or doing something stupid.
Veeam support also took a look with me while we were working on a separate 12.3 issue, and he threw his hands up in confusion.
And it is a "veeam issue" in that it only happens on the veeam folders. If I go to /etc or other locations and use the exact same syntax (up-arrowing to repeat, not even re-typing) it works happily.
Ultimately I sorted it by doing it recursively at the folder level, which oddly worked even though doing the file level wouldn't.
chattr -i -R foldername
The above cleared the flag from the files within the folder.
It's not like there is some crazy complex syntax going on here lol... can only type chattr -i so many times incorrectly and I've done it a thousand or so times, including with a couple colleagues to make sure I wasn't going crazy or doing something stupid.
Veeam support also took a look with me while we were working on a separate 12.3 issue, and he threw his hands up in confusion.
And it is a "veeam issue" in that it only happens on the veeam folders. If I go to /etc or other locations and use the exact same syntax (up-arrowing to repeat, not even re-typing) it works happily.
Ultimately I sorted it by doing it recursively at the folder level, which oddly worked even though doing the file level wouldn't.
chattr -i -R foldername
The above cleared the flag from the files within the folder.
-
- Veeam Legend
- Posts: 518
- Liked: 145 times
- Joined: Apr 22, 2022 12:14 pm
- Full Name: Danny de Heer
- Contact:
Re: can't change immutable flag to delete files from hard rep
Still sounds like a lock or a hidden file.
The reason why I wrote it’s not a veeam issue because it’s not. It’s a Linux and or filesystem issue.
Glad you fixed it though!
The reason why I wrote it’s not a veeam issue because it’s not. It’s a Linux and or filesystem issue.
Glad you fixed it though!
VMCE / Veeam Legend 2*
-
- Expert
- Posts: 227
- Liked: 28 times
- Joined: Nov 12, 2014 9:40 am
- Full Name: John Johnson
- Contact:
Re: can't change immutable flag to delete files from hard rep
Don't see how it could be a lock or hidden file causing this absurd behavior. The syntax is fine but the POS is saying it's not. Pretty simple. A lock would not have been magically cleared by the recursive chattr at the folder level, yet everything was easily deleted after that. Clearly Veeam has done something unique to those folders as they behave completely differently than all other system folders. Ubuntu giving MS a run for their money wrt ridiculous inconsistency.
Who is online
Users browsing this forum: Baidu [Spider] and 70 guests