1

I'm using lsattr on a linux container on the contents of a mounted drive that's been mounted using SAMBA and am seeing some interesting results.

If I run lsattr in quick succession, I get differing results:

lsattr | grep REL0000000001.txt
s-S--adA--jI------- ./REL0000000001.txt
lsattr | grep REL0000000001.txt
suS-i---c-jI------- ./REL0000000001.txt
lsattr | grep REL0000000001.txt
-uS-----c-jI------- ./REL0000000001.txt
lsattr | grep REL0000000001.txt
s---------jI------- ./REL0000000001.txt
lsattr | grep REL0000000001.txt
s----adA--jI------- ./REL0000000001.txt
lsattr | grep REL0000000001.txt
suS---d-c-jI------- ./REL0000000001.txt
lsattr | grep REL0000000001.txt
-u--ia--c-jI------- ./REL0000000001.txt

Does anyone know why they would be changing?

Also interestingly, when I rapidly do lsattr while passing in the filename as an argument, no attributes are set:

lsattr REL0000000010.txt
------------------- REL0000000010.txt
lsattr REL0000000010.txt
------------------- REL0000000010.txt
lsattr REL0000000010.txt
------------------- REL0000000010.txt

And when I run it while logged into directly into the server that's been mounted using SAMBA, I get a different set of attributes:

lsattr REL0000000010.txt
----------------e-- REL0000000010.txt
lsattr REL0000000010.txt
----------------e-- REL0000000010.txt

I would think that file attributes would be the same, regardless of what user you're signed in as and from where you're accessing the file.

Does anyone have thoughts into why this is happening? Especially the first example where running the same command over and over again is returning different results; that's really nuts!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.