- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to grant a user to assess a directory under ro...
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
11-06-2008 09:25 AM
11-06-2008 09:25 AM
So that all the users can do a mkdir in it..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2008 09:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2008 09:30 AM
11-06-2008 09:30 AM
Re: how to grant a user to assess a directory under root ex... /tmp
$ ll -d /tmp
drwxr-xr-x 4 root root 1024 Nov 6 10:26 /tmp
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2008 09:35 AM
11-06-2008 09:35 AM
Re: how to grant a user to assess a directory under root ex... /tmp
If the user can create a file then the user can create a directory. Directories confer the privilege.
Normal users should not create files or directories in '/tmp'. Rather, applications are intended to use '/var/tmp' for their temporary needs, reserving '/tmp' for root and operating system procecess.
That said, a good structure looks like:
# ls -ld /var
dr-xr-xr-x 26 bin bin 8192 Oct 29 2007 /var
# ls -ld /var/tmp
drwxrwxrwt 18 root sys 8192 Nov 6 12:27 /var/tmp
The absence of the (w)rite permission on '/var' prevents a non-root user from creating files or directories there, *but* allows those actions in '/var/tmp' (because of its (w)rite permissions.
Notice the use of the sticky-bit ('t') on '/var/tmp'. This prevents user "Able" from removing (deleting) a file owned by user "Baker". Directories confer write and delete permissions to files.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2008 09:35 AM
11-06-2008 09:35 AM
Re: how to grant a user to assess a directory under root ex... /tmp
The standard permissions for /tmp on HP-UX are:
rwxrwxrwt
To fix that do a:
chmod 1777 /tmp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2008 09:41 AM
11-06-2008 09:41 AM
Re: how to grant a user to assess a directory under root ex... /tmp
Are you now asking how to fix them the way you want them? If so, i'd suggest:
man chmod
which would have answered your original question as well
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2008 09:53 AM
11-06-2008 09:53 AM
Re: how to grant a user to assess a directory under root ex... /tmp
Thanks for the wonderful explanation
I now understand the purpose of sticky bit and the directory permissions
Mine looks something like below
$ ll -d /tmp
drwxr-xr-x 4 root root 1024 Nov 6 10:26 /tmp
$ ls -ld /var
dr-xr-xr-x 23 bin bin 8192 Oct 3 13:40 /var
$ ls -ld /var/tmp
drwxrwxrwt 9 root root 8192 Nov 6 10:43 /var/tmp
$
To understand directories & their permissions and the use of sticky bit, creation & deletion .. could you give me a document or link where I can read and experiment on my test boxes...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2008 10:00 AM
11-06-2008 10:00 AM
Re: how to grant a user to assess a directory under root ex... /tmp
I checked 7 different 11.11 boxes and they're all set that way, right out of the box, as it were. Are you looking at 11.23 or 11.31, by chance?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2008 10:02 AM
11-06-2008 10:02 AM
Re: how to grant a user to assess a directory under root ex... /tmp
> To understand directories & their permissions and the use of sticky bit, creation & deletion .. could you give me a document or link where I can read and experiment on my test boxes...
Yes:
# man chmod
# man 2 chmod
+ portions of:
http://docs.hp.com/en/B2355-90950/B2355-90950.pdf
By the way, there are cases in applications where setting the sticky bit on a directory like '/var/tmp' will cause problems. This is where user-one creates a file with a non-unique name; doesn't delete it; and user-two comes along to try and create the same named file. He will fail! Caveat emptor.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2008 10:55 AM
11-06-2008 10:55 AM
Re: how to grant a user to assess a directory under root ex... /tmp
gray ( learning unix bit by bit )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2008 11:07 AM
11-06-2008 11:07 AM
Re: how to grant a user to assess a directory under root ex... /tmp
Mine are all a combination of 10.20, 11.0 and 11.11 and are all rwxrwxrwt for /tmp.
Maybe we set ours that way manually after install. At this point I do not remember.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2008 11:27 AM
11-06-2008 11:27 AM
Re: how to grant a user to assess a directory under root ex... /tmp
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2008 10:55 PM
11-06-2008 10:55 PM
Re: how to grant a user to assess a directory under root ex... /tmp
For security, the sticky bit should be set. I don't think 11.11 came with that.
The compilers now complain if TMPDIR doesn't have that bit set if Write Other is enabled. It will dump a big thesis in syslog.log.