Lsattr: Permission Denied While Reading Flags on

Author Message LordShaftesbu... This post is not being displayed .
LordShaftesbu...
Earth Chat Champion

Joined: 03 Sep 2008
Karma :


Post Posted: 10:00 - 03 Jun 2013 Post subject: UNIX file permissions trouble Reply with quote

A educatee has somehow managed to set up the permissions on one of their files to:

Code:
---------- 1 student grouping 36749 2013-06-01 14:42 file.sdf

Even equally root I can't change the permissions or even read the file:

Code:
# chmod 666 output.sdf
chmod: changing permissions of `file.sdf': Operation not permitted
# cat file.sdf
cat: file.sdf: Permission denied

I've done some googling and found mention of a special immutable bit, but manifestly that should show upwardly as a 't' at the end of the permissions. Anyhow, I can't check considering chattr doesn't piece of work either:

Quote:

# chattr -i file.sdf
chattr: Permission denied while reading flags on file.sdf


What the hell? Why can't root read this file?

 Back to top duhawkz This postal service is not being displayed .
duhawkz
Globe Conversation Champion

Joined: 03 Dec 2006
Karma :


Post Posted: 12:47 - 03 Jun 2013 Post field of study: Reply with quote

Accept you tried taking buying of information technology

Chown root.root file.sdf

And then resetting the permissions
____________________
"The guy is a worthless cunt and I honestly believe I would be a slightly happier person if he died." - Chris-Scarlet

 Dorsum to top toshpot This mail service is not beingness displayed .
toshpot
Scooby Slapper

Joined: 12 Aug 2012
Karma :


Post Posted: thirteen:xiii - 03 Jun 2013 Post subject: Reply with quote

Accept you checked for extra attributes using lsattr?

If you are able to cp the file, you lot might get a quick workaround moving to a filesystem without linux style permissions (like a Fatty USB bulldoze, or an NTFS partition)

Quite odd though, that root cannot read the file also every bit root being unable to change permissions.
____________________
Sometimes, I impact myself and smell my fingers.

 Dorsum to superlative The Shaggy D.A. This postal service is not being displayed .
The Shaggy D.A.
Super Spammer

Joined: 12 Sep 2008
Karma :


 Back to summit LordShaftesbu... This post is not being displayed .
LordShaftesbu...
World Chat Champion

Joined: 03 Sep 2008
Karma :


Post Posted: 18:02 - 03 Jun 2013 Postal service bailiwick: Reply with quote

Code:
# chown root.root file.sdf
chown: changing ownership of `file.sdf': Operation not permitted

# lsattr file.sdf
lsattr: Permission denied While reading flags on file.sdf

# cp file.sdf tmp
cp: cannot open `file.sdf' for reading: Permission denied

Apologies for the typo; the file is file.sdf not output.sdf.

 Back to top toshpot This mail service is non being displayed .
toshpot
Scooby Slapper

Joined: 12 Aug 2012
Karma :


Post Posted: 22:26 - 03 Jun 2013 Post discipline: Reply with quote

What environment are you on here? what filesystem, is SELinux or equivalent in play here?

can you successfully make a file, and chattr/lsattr it?

The only affair I tin think of stopping chattr and lsattr is non-root permissions, or SELinux similar mischief.
____________________
Sometimes, I bear upon myself and scent my fingers.

 Back to height duhawkz This postal service is non being displayed .
duhawkz
World Conversation Champion

Joined: 03 Dec 2006
Karma :


Post Posted: 09:42 - 04 Jun 2013 Post subject: Reply with quote

Couple of other thingd you could check.

Has an additional acl been set on the file, is the a + sign next to the standard file permissions.

Does

getfacl file.sdf

Bring back whatsoever additional info

Bank check selinux is off / set to permissive mode.

Sestatus
____________________
"The guy is a worthless cunt and I honestly believe I would exist a slightly happier person if he died." - Chris-Crimson

 Back to pinnacle t121anf This post is non being displayed .
t121anf
World Conversation Champion

Joined: 23 February 2007
Karma :


 Back to top LordShaftesbu... This postal service is not beingness displayed .
LordShaftesbu...
World Chat Champion

Joined: 03 Sep 2008
Karma :


Post Posted: 11:49 - 04 Jun 2013 Post subject: Reply with quote

Code:
# ls -l file.sdf
---------- i student group 36749 2013-06-01 14:42 file.sdf

# getfacl file.sdf
# file: file.sdf
# possessor: student
# grouping: group
user::---
grouping::---
other::---

SELinux is running but in permissive mode - I oasis't had whatsoever warning letters from it.

The file is in a directory chosen tutorial, 'touch exam.txt' in that directory says permission denied despite the fact I'm root.

Lawmaking:
# ls -ld tutorial/
drwxr-xr-10 3 student group 4096 2013-06-01 14:42 tutorial/


Does the 'other' (user/group/other) set need write permission? I thought root could do anything?

 Dorsum to top duhawkz This mail is non being displayed .
duhawkz
World Conversation Champion

Joined: 03 Dec 2006
Karma :


Post Posted: 07:56 - 05 Jun 2013 Mail subject field: Reply with quote

Your correct root "should" be able to access more than or less every file on the system

Have you tried copying the file or the directory to another area that you can definately write to, that manner the copy should inherit the permissions of the destination.

Declining that rm -rf / should sort it out Wink
____________________
"The guy is a worthless cunt and I honestly believe I would exist a slightly happier person if he died." - Chris-Red

 Back to top benc This postal service is not beingness displayed .
benc
Scooby Slapper

Joined: 16 Jul 2005
Karma :


 Back to top toshpot This post is not being displayed .
toshpot
Scooby Slapper

Joined: 12 Aug 2012
Karma :


 Dorsum to peak subhendugiri This post is not being displayed .
subhendugiri
L Plate Warrior

Joined: 25 Jun 2013
Karma :


 Back to top
Old Thread Warning!

The final post was made 8 years, 254 days ago. Instead of replying here, would creating a new thread be more useful?

Brandish posts from previous:  


Read the Terms of Use! - Powered by phpBB © phpBB Grouping

Debug Mode: ON - Server: birks (world wide web) - Page Generation Time: 3.20 Sec - Server Load: 0.03 - MySQL Queries: 16 - Page Size: 79.39 Kb

hernandezkneand1992.blogspot.com

Source: https://www.bikechatforums.com/viewtopic.php?t=272830

0 Response to "Lsattr: Permission Denied While Reading Flags on"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel