?
Solved

FIle permissions

Posted on 2000-02-21
3
Medium Priority
?
337 Views
Last Modified: 2013-12-06
How on earth fo i set the permissions in HP-UX to make all files created in a dire 'inherit' the permissions of the dir? (including uid / gid?)

The dir is chown caduser:cadgrp and chown 775, but when a user create a file in the dir it gets his/her uid/gid. Any hints?
0
Comment
Question by:j2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
3 Comments
 
LVL 1

Expert Comment

by:rleyton
ID: 2541947
You don't really want to set a directory to create files in another uid (think about it - unless you ARE the user, you don't want that - you always want to know who created the file), and in any form of Unix I've ever used, you can't.

But you CAN set the files to have the directory  GID set. Set the 'set gid' bit. The easiest way is:

chmod g+s .

Or chmod 4774 .

If you want others to write to the file, just make sure that everybody who writes to the directory has a umask of at least '002'.

Be careful with the meaning of 'set gid' and 'set uid' when it pertains to directories - they have VERY different meanings when applied to files.

Regards,

Richard.
0
 
LVL 1

Expert Comment

by:rleyton
ID: 2541949
You don't really want to set a directory to create files in another uid (think about it - unless you ARE the user, you don't want that - you always want to know who created the file), and in any form of Unix I've ever used, you can't.

But you CAN set the files to have the directory  GID set. Set the 'set gid' bit. The easiest way is:

chmod g+s .

Or chmod 4774 .

If you want others to write to the file, just make sure that everybody who writes to the directory has a umask of at least '002'.

Be careful with the meaning of 'set gid' and 'set uid' when it pertains to directories - they have VERY different meanings when applied to files.

Regards,

Richard.
0
 
LVL 1

Accepted Solution

by:
rleyton earned 80 total points
ID: 2541950
You don't really want to set a directory to create files in another uid (think about it - unless you ARE the user, you don't want that - you always want to know who created the file), and in any form of Unix I've ever used, you can't.

But you CAN set the files to have the directory  GID set. Set the 'set gid' bit. The easiest way is:

chmod g+s .

Or chmod 4774 .

If you want others to write to the file, just make sure that everybody who writes to the directory has a umask of at least '002'.

Be careful with the meaning of 'set gid' and 'set uid' when it pertains to directories - they have VERY different meanings when applied to files.

Regards,

Richard.
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question