- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- change mode
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2003 11:50 PM
тАО01-06-2003 11:50 PM
change mode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2003 11:56 PM
тАО01-06-2003 11:56 PM
Re: change mode
Once write bit is set on the file for all the users , anybody can also delete/overwrite that file. SO your requirement is not possible.
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-06-2003 11:56 PM
тАО01-06-2003 11:56 PM
Re: change mode
I am not sure if I understand your question correctly.
If you DO NOT want others to write to this file, do "chmod 755
If you WANT all users to write to this file, do "chmod 777
Then after that, login as root, do "chmod root:sys
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2003 12:06 AM
тАО01-07-2003 12:06 AM
Re: change mode
# cd /tmp
# mkdir dirA
# chmod 750 dirA
# chown root:users dirA
# cd /tmp/dirA
# touch fileA
# chmod 777 fileA
Now as normal user (assuming group ownership is "users"), fileA can be modified by anyone but cannot be deleted by anyone except root. Ignore if this is not what you're looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2003 12:26 AM
тАО01-07-2003 12:26 AM
Re: change mode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2003 01:06 AM
тАО01-07-2003 01:06 AM
Re: change mode
setting sticky bit on a file will provide a way where only the owner or the super user can delete the file.
Create a file /tmp/a as root user and set sticky bit for the file with 777 permissions.
That should be fine.
chmod 1777
Also make sure the owner is root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2003 01:55 AM
тАО01-07-2003 01:55 AM
Re: change mode
sticky bit wont work for regular files
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2003 02:08 AM
тАО01-07-2003 02:08 AM
Re: change mode
It works only for dir.
Then you should think of ACL's.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2003 05:45 AM
тАО01-07-2003 05:45 AM
Re: change mode
For example, create a directory owned by root with 755 permissions. Then touch a file inside the directory and give it 666 permissions. Now as an ordinary user, you can do anything to the file EXCEPT remove it! The directory permissions control the existence, while the file permissions control the contents. Set the directory ownership to the user that can actually remove the file and you've protected the file(s).
As mentioned the sticky bit may be set on a globally writable directory such as /tmp (normally 777 permission, set sticky with 1777 permissions) and this will disable the ability of everyone except the owner of the file from removing the file. Now the file can be 666 permissions and the contents changed by anyone but not removed (or renamed) except by the owner. This is commonly done for /tmp and /var/tmp
Bill Hassell, sysadmin