ZFS Unable to chflags on ZFS filesystem

decuser

Active Member

Reaction score: 74
Messages: 216

I tried to chflags a newly minted file in my home directory and got "operation not supported". I tried it as sudo and as owner to no avail. I have tried it on my ufs systems and it worked, but now, on my ZFS system, it doesn't. I'm not sure ZFS is the issue, but would appreciate some troubleshooting tips. Here's the transcript:

Bash:
touch a.txt
chflags uchg a.txt
chflags: a.txt: Operation not supported

sudo chflags uchg a.txt
chflags: a.txt: Operation not supported
echo $?
1
perror 1
OS error code   1:  Operation not permitted

ls -l a.txt
-rw-r--r--  1 wsenn  wsenn  0 Aug 28 12:50 a.txt
who am i
wsenn            pts/0        Aug 28 12:50 (terra)

I didn't set any local properties on the dataset. Should chflags work with ZFS?
 

chrbr

Aspiring Daemon

Reaction score: 341
Messages: 855

May be you did just a typo. chflags noschg and chflags schg work as root here.
EDIT: I have seen that there is uchg as well. chflags uchg does not work for me either. May be ZFS just does not have this flag.
 
OP
decuser

decuser

Active Member

Reaction score: 74
Messages: 216

hmm, chflags schg works, but not chflags uchg according to chflags():

uchg, uchange, uimmutable
set the user immutable flag (owner or super-user only)

So, I guess the question is can you set immutable flag for user on ZFS?
 
Top