- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- set the file right
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
Forums
Discussions
Discussions
Discussions
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
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
05-20-2003 07:09 PM
05-20-2003 07:09 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 07:16 PM
05-20-2003 07:16 PM
Solution# chown skchan:users file
==> Change ownership of "file" to owner=skchan group=users
# chmod 644 file
==> That gives skchan (the owner) read and write permission. Other users in group "users" can only read and the rest of the world can only read.
In both cases man chmod and man chown wil give you the details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 07:18 PM
05-20-2003 07:18 PM
Re: set the file right
As I know , add the permission "t" can also prevent the user to delete the file , how to set it ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 07:21 PM
05-20-2003 07:21 PM
Re: set the file right
$ chmod 600 myfile
Before creation of the file set your umask
$ umask 077
$ touch mynewfile
Regards
Michael
"When I have trouble spelling, it's called fat finger syndrome"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 07:23 PM
05-20-2003 07:23 PM
Re: set the file right
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 07:26 PM
05-20-2003 07:26 PM
Re: set the file right
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 07:27 PM
05-20-2003 07:27 PM
Re: set the file right
To set the permission of the directory/filesystem:
$ chmod +t /tmp
Regards
Michael
"When I have trouble spelling, it's called fat finger syndrome"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 07:29 PM
05-20-2003 07:29 PM
Re: set the file right
It means that only the owner or the super user can delete the file in the dir.
#chown 1777
THanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 07:36 PM
05-20-2003 07:36 PM
Re: set the file right
I try r method "chmod +t /tmp/file" , then the file premission changed to "-r--r--r-T" , however , i tried other users can still delete/update it ,even change the ownership after update the file. thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 07:38 PM
05-20-2003 07:38 PM
Re: set the file right
if it is file not dir , how to make this setting ? thx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 08:01 PM
05-20-2003 08:01 PM
Re: set the file right
Using ACL's you can do that.
check the man pages of setacl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 08:02 PM
05-20-2003 08:02 PM
Re: set the file right
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 09:23 PM
05-20-2003 09:23 PM
Re: set the file right
except ACL , is there any other method can do that ?thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 09:52 PM
05-20-2003 09:52 PM
Re: set the file right
If this is only what you want you can just do what Chan has replied.
Do a chmod 644 on the file so that only owner can update/delete others can only read?
What else you are looking for?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 10:24 PM
05-20-2003 10:24 PM
Re: set the file right
You've got all needed answers ... But I can summarize :
- Owner can update and others can only read :
chmod 644 file
- Owner can delete file but others can't, this is managed at the directory level (the directory where the file is located) :
. If directory belongs to the owner of the file :
chmod 755 dir
. If directory is a public one (like /tmp) :
chmod 1777 /tmp
Regards.