Sponsored Content
Operating Systems AIX set permission to files in /tmp Post 302098483 by cchiang12 on Monday 4th of December 2006 01:43:06 PM
Old 12-04-2006
I just noticed the "sticky bit". Silly me.
drwxrwxrwt<--
only the owner of the directory, owner of the file, root can delete file in the "sticky bit" file system.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

set up cron permission in Sun

Under this directory: /var/spool/cron/crontabs/ I have the following users: adm lp oracle root sys uucp I believe who are able to start a cron job. I am trying to create a cronjob under user banjob so that it can delete files older than 30 days. How can I add user banjob... (4 Replies)
Discussion started by: simt
4 Replies

2. UNIX for Dummies Questions & Answers

default permission of /var/tmp in AIX

I'm getting an error when trying to vi my .profile. This is the first time I've logged onto this machine and apparently its rarely logged into. I'm assuming from the error that it's a permissions problem in the /var/tmp directory. Can anyone assist? $ uname -a AIX machine 1 5 000D96BF4C00 $... (3 Replies)
Discussion started by: dangral
3 Replies

3. Solaris

permission of /var/tmp

what's the impact if I change /var/tmp's permission into 750? (7 Replies)
Discussion started by: a2156z
7 Replies

4. UNIX for Dummies Questions & Answers

Change permission for a set of files

Hi there, I want to change from this permission -r-xr-xr-x to -r-xr-xr-- for a set of files under unix. Can someone help me to go-about doing this in one shot. Cheers, RN (2 Replies)
Discussion started by: karthickrn
2 Replies

5. Solaris

set-tmp-permission service is not running in Netra CCMP3060 blade server

In my Solaris 10 - Netra CP3060, the following particular script is not running: lrc:/etc/rc2_d/S00set-tmp-permissions lrc:/etc/rc2_d/S07set-tmp-permissions Above script is to set the default permission of /tmp & /var/tmp while rebooting if it found any inconsistencies. I changed the file... (4 Replies)
Discussion started by: ramnagaraj
4 Replies

6. Solaris

Permission of tmp file

The script written by csh, when it running it make some tmp file, the process need to read the tmp file to complete but tmp unable to open, don't have permission. Anyone know the way to automatic chmod the tmp file when run process. (2 Replies)
Discussion started by: Diabolist9
2 Replies

7. UNIX for Dummies Questions & Answers

How to set default permission

Hey Guys, First post here. I just started learning UNIX a few weeks ago. My issue: I use FreeNAS which is based off of UNIX in my network environment which hosts files that my team needs to access. Each user has their own login but we are all part of a group called "ITLIC". I have a share... (15 Replies)
Discussion started by: uglycustoomer
15 Replies

8. Shell Programming and Scripting

Help to set permission on password files in script

Hi Techies I am stuck in a problem, I have written a script which is calling a second script which contains some command and password for quering on database. I do not want to disclose this command or specially password file. Please help.. Please have a look on directory structure and... (2 Replies)
Discussion started by: atul9806
2 Replies

9. AIX

How to set owner and permission for files/directory in directory in this case?

Hi. My example: I have a filesystem /log. Everyday, log files are copied to /log. I'd like to set owner and permission for files and directories in /log like that chown -R log_adm /log/* chmod -R 544 /log/*It's OK, but just at that time. When a new log file or new directory is created in /log,... (8 Replies)
Discussion started by: bobochacha29
8 Replies

10. Shell Programming and Scripting

Issue with rsync: failed to set times on "/tmp/.": Not owner (1)

Hi, Here is my source host and folder details. $ hostname source-host $ id uid=600000208(src-user) gid=64688(src-user) groups=64688(src-user) $ ls -ltrd /web/Trn_File/data/ drwxrwxrwx 3 src-user src-user 4096 Feb 7 15:27 /web/Trn_File/data/ $ ls -ltrd /web/Trn_File/data/* drwxrwxrwx 8... (1 Reply)
Discussion started by: mohtashims
1 Replies
sticky(8)						      System Manager's Manual							 sticky(8)

Name
       sticky - executable files with persistent text

Description
       The sticky bit (file mode bit 01000), is used to indicate special treatment for certain executable files and directories.

       While the sticky bit, mode 01000 is set on a sharable executable file, the text of that file will not be removed from the system swap area.
       Thus the file does not have to be fetched from the file system upon each execution.  As long as a copy remains in the swap area, the origi-
       nal  text  cannot  be  overwritten  in  the file system, nor can the file be deleted.  Directory entries can be removed so long as one link
       remains.

       Sharable files are made by the and options of

       To replace a sticky file that has been used, clear the sticky bit with and execute the old program to flush the swapped copy.  This can	be
       done  safely  even  if others are using it.  Overwrite the sticky file.	If the file is being executed by any process, writing will be pre-
       vented.	It suffices to simply remove the file and then rewrite it, being careful to reset the owner and mode with and Set the  sticky  bit
       again.

       A  directory  whose  sticky bit is set becomes an append-only directory, or, more accurately, a directory in which the deletion of files is
       restricted.  A file in a sticky directory may only be removed or renamed by a user if the user has write permission for the  directory  and
       the  user  is the owner of the file, the owner of the directory, or the superuser.  This feature is usefully applied to directories such as
       which must be publicly writeable but should deny users the license to arbitrarily delete or rename each others' files.

Restrictions
       Only the superuser can set the sticky bit.

See Also
       chmod(2)

								       RISC								 sticky(8)
All times are GMT -4. The time now is 12:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy