Sponsored Content
Operating Systems Solaris immutable flag or similar for Solaris 10 / ZFS Post 302470533 by jlliagre on Wednesday 10th of November 2010 10:23:16 AM
Old 11-10-2010
ZFS implements the immutable flag. Here is how to use it:
Code:
# mkdir /pool/im   
# ls -d/ v /pool/im
drwxr-xr-x   2 root     root           2 nov. 10 16:07 /pool23g/ro/im
        {archive,nohidden,noreadonly,nosystem,noappendonly,nonodump,noimmutable,av_modified,noav_quarantined,nonounlink}
# chmod S+ci /pool/im
# ls -d/ v /pool23g/ro/im
drwxr-xr-x   2 root     root           2 nov. 10 16:07 /pool/im
        {archive,nohidden,noreadonly,nosystem,noappendonly,nonodump,immutable,av_modified,noav_quarantined,nonounlink}
# id
uid=0(root) gid=0(root)
# rmdir /pool/im
rmdir: /pool/im: cannot remove [Not owner]
# chmod S-ci /pool/im
# rmdir /pool/im

However, I believe this only works with SunOS 5.11 based OSes, not Solaris 10. I have no idea about if this will be backported.
An alternative would be a dtrace script that will monitor any attempt to remove that specific directory and make this fails.
 

8 More Discussions You Might Find Interesting

1. Solaris

Solaris 10 ZFS

I'm typing on a nice Sunblade 100 that is willing to be a lab rat for my experiments. I installed Solaris 10 and want to mess with ZFS. Does anyone have any docs on how to install zfs or how to convert my current UFS filesystems to ZFS? Does anyone have any experiences good or bad with ZFS... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

2. Solaris

CC 5.5 compiler flag to issue 64bit porting warnings on sparc-solaris

Hi, We are porting our application from 32bit to 64bit. We tried -xarch=v9, -xarc=v9a and -xport64=full options so that compiler to issue 64bit porting warnings. But we are not getting any porting warninings WE are using CC 5.5 compiler on sparc-solaris m/c. Please tell us some powerful... (0 Replies)
Discussion started by: shobhah
0 Replies

3. Solaris

immutable bit question

Hi! All Just wondering if anyone has a idea about setting the immutable bit on a Solaris 10 ZFS file I tried this chmod S+ci toto.txt and got that :-( chmod: ERROR: invalid mode (0 Replies)
Discussion started by: Ex-Capsa
0 Replies

4. Solaris

Solaris 10 ZFS ACL help

All, Does anyone know of a simple way to traverse a file system and collect all ACL's (or ACE's as they are called now)? We use to be able to use getfacl fairly easily for this task but now we are forced to use -v or -V with the 'ls' command to get the extended permissions for a... (1 Reply)
Discussion started by: Shoeless_Mike
1 Replies

5. Solaris

dual boot solaris/solaris zfs file system

Hi, I am running into a some problems creating a dual boot system of 2 solaris instances using ZFS file system and I was wondering if someone can help me out. First some back ground. I have been asked to change the file system of our server from UFS to ZFS. Currently we are using Solaris... (3 Replies)
Discussion started by: estammis
3 Replies

6. Solaris

Is there a similar tool with authconfig of Linux on Solaris?

Hi Dears, I believe you know authconfig on most of Linux Distributions. However, on Solaris OS, I don't know the similar tool. Could you please share me the tool, if any? Note: I am using SunOS 5.10. (0 Replies)
Discussion started by: crest.boy
0 Replies

7. Solaris

Solaris ZFS question

What I am trying to do is reuse space that was used from an old solaris zone and take that space used in the 2 disk mirror from the 2nd zpool and relocate it to /var/audit in the root pool. The pysical server has 4 disks. 2 disks are a mirrored root zone(c1t0d0s0,c1t1d0s0) and the other were the... (1 Reply)
Discussion started by: jpolachak
1 Replies

8. Solaris

Install Solaris 11 with ZFS

Hi, I'm not expert with solaris. I Familiar with Linux variant only. Could anyone point me to right tutorial? I got one > but not sure it can be use or not. I'm doing fresh install for new server. The server spec did not come out yet. Please assist me. Thanks. (17 Replies)
Discussion started by: mzainal
17 Replies
CHFLAGS(1)						      General Commands Manual							CHFLAGS(1)

NAME
chflags - change file flags SYNOPSIS
chflags [-R] [-f]flags file ... DESCRIPTION
The chflags utility modifies the file flags of the listed files as specified by the flags operand. The options are as follows: -R Change the file flags for the file hierarchies rooted in the files instead of just the files themselves. -f chflags will not complain if it fails to change the flags on a file. Flags are a comma separated list of keywords. The following keywords are currently defined: arch No effect. This bit is defined and will be set/cleared as requested but nothing in the system makes use of it yet. dump Set the dump flag sappnd Set the system append-only flag (super-user only) schg Set the system immutable flag (super-user only) uappnd Set the user append-only flag (owner or super-user only) uchg Set the user immutable flag (owner or super-user only) Putting the letters no before an option causes the flag to be turned off. For example: nodump the file should never be dumped Symbolic links do not have flags and are silently ignored by chflags. When the -R option is given and symbolic links are encountered they are not traversed. This is the same behaviour as chmod(1). The chflags utility exits 0 on success, and >0 if an error occurs. SEE ALSO
chflags(2), stat(2), symlink(7) 4th Berkeley Distribution November 28, 1994 CHFLAGS(1)
All times are GMT -4. The time now is 04:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy