Solaris sticky bit

i got this archive file on sticky bit mode. somehow i could not remove the sticky bit. i could not even copy or view the view using file user account or root account.

-rw-r--r-T 1 mark support 875166720 Mar 23 2005 file_mig.dat

anybody encounter this type of problem?

i have done running the command:

#chmod -t file_mig.dat

i found this on google:
T Permission Sticky bit is on, execution bit for others is off

i already using file owner account but still got this problem of not able to view or copy the file

when i tried to view the file with sticky bit on it got this message:

file temporarily unavailable on the server, retrying...

Logged in as root you should be able to manipulate all security settings.

So keeping the owner, group, others rights the same as now what does:

# chmod 0644 file_mig.dat

do?

It might be that some process has the file open.

Hi,

The use of the sticky bit changes greatly from one nix to an other, what is the OS and version?

Regards

Gull04

@gull04......I assumed that since the OP is on the Solaris forum that is the O/S.

Hi hicksd8,

Was just opening mouth to change feet - sorry.

Assuming that it's 11 then it may be that the only root can remove the file as I think that there was a change in one of the 10 updates (10/9) I think, in that the parent directory has to be owned by the file owner as well or the user has to be a priv user.

Regards

Gull04

@gull04....Yes, you're correct. However, from the OP post, I think we're trying to strip out the sticky bit, not remove the file. Removal of the file means modifying the directory above (need right to) whereas stripping the sticky bit is a modification of that file's inode only.

If you look at the Solaris man pages on this forum, you'll note that only a user with privileges (such as root) can set the sticky bit on a regular file. Doing that tells the OS that this file is to be used as a swap file. The man pages explicitly state that the system ignores the sticky bit when a normal user is using chmod() on a regular file. The man pages don't explicitly state that a privileged user can't clear the sticky bit, but I assume that no one can clear that bit if the file is assigned to an active swap partition. (By any chance does this file show up as part of a swap partition when you run the mount command?)

@Don Cragun........What you say contradicts my longstanding generic understanding that 'sticky bits' cause a file to remain in virtual memory not become virtual memory. It is used (typically) on very frequently used executables to prevent them having to be loaded from disk every time thereby vastly improving load time of the application. Do correct me if I'm wrong.

From the Solaris chmod(2) man page:

Your longstanding generic understanding is correct for executable files. A file that ls -l shows up as:

-rw-r--r-T 1 mark support 875166720 Mar 23 2005 file_mig.dat

as is being discussed in this thread, is not executable.

@Don Cragun......Thanks. You learn something new every day!!! Great forum this!!

Actually, the page you quoted shows that Solaris does not work that way. I would be surprised if any OS released this century still behaves like that.

Yes, IIRC it was SunOS 4, later named Solaris 1 (to boost the Solaris sales).