HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- File and directory Security
Operating System - HP-UX
1841094
Members
3083
Online
110176
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
10-13-2005 11:07 PM
10-13-2005 11:07 PM
File and directory Security
Hello all
For exemple i have à parent directory /Papa that contain File1.
how can i give a user possibility just to create files in /Papa but not to modify or delete the created files.
thanks a lot
For exemple i have à parent directory /Papa that contain File1.
how can i give a user possibility just to create files in /Papa but not to modify or delete the created files.
thanks a lot
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2005 11:23 PM
10-13-2005 11:23 PM
Re: File and directory Security
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2005 11:39 PM
10-13-2005 11:39 PM
Re: File and directory Security
You can do this with sudo our a script.
Becuase you must make the fileowner differnt from the user thats created the file.
If you have sude it would be something like this in the sudoers file.
The user must be in the sys group in the example.
Cmnd_Alias CREATEFILE = touch /Pappa/
## bind command to groups
# SYS
SYS ALL = (ROOT)CREATFILE
grtz. Mark
Becuase you must make the fileowner differnt from the user thats created the file.
If you have sude it would be something like this in the sudoers file.
The user must be in the sys group in the example.
Cmnd_Alias CREATEFILE = touch /Pappa/
## bind command to groups
# SYS
SYS ALL = (ROOT)CREATFILE
grtz. Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2005 03:04 AM
10-17-2005 03:04 AM
Re: File and directory Security
Here's another way:
You must have the directory write capable by the user's group.
The user can create the file, then modify permissions using "chmod" and change ownership and/or group of the file using "chown" or "chgrp" to give away the file. Permissions must be changed prior to owner or group change.
Example:
User ID: baddou
baddou groups: bgroup, users
/Papa would have group of "users" and group write perms set.
baddou creates /Papa/File1.
baddou sets permissions on /Papa/File1 to 770 with "chmod 770 /Papa/File1.
baddou sets ownership of File1 like so: "chown user1:agroup /Papa/File1"
After this is done, user baddou cannot do anything else with /Papa/File1.
However, you need "user1" to be a valid user or use "root". Also "agroup" needs to be a valid group and other users who need to access File1 need to be in the "agroup" group.
I hope this makes sense. The bottom line of the example is that a user is able to "give away" a file by changing ownership to another user. Once this is done, it cannot be undone by the user, only the new owner.
Regards,
Steve
You must have the directory write capable by the user's group.
The user can create the file, then modify permissions using "chmod" and change ownership and/or group of the file using "chown" or "chgrp" to give away the file. Permissions must be changed prior to owner or group change.
Example:
User ID: baddou
baddou groups: bgroup, users
/Papa would have group of "users" and group write perms set.
baddou creates /Papa/File1.
baddou sets permissions on /Papa/File1 to 770 with "chmod 770 /Papa/File1.
baddou sets ownership of File1 like so: "chown user1:agroup /Papa/File1"
After this is done, user baddou cannot do anything else with /Papa/File1.
However, you need "user1" to be a valid user or use "root". Also "agroup" needs to be a valid group and other users who need to access File1 need to be in the "agroup" group.
I hope this makes sense. The bottom line of the example is that a user is able to "give away" a file by changing ownership to another user. Once this is done, it cannot be undone by the user, only the new owner.
Regards,
Steve
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP