×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

create files on specified directory with right access 775

create files on specified directory with right access 775

create files on specified directory with right access 775

(OP)
The users can create files on specified directory with right access 775 (rwx-rwx-r-x) without using crontab to chmod -R g+w /dir1/dir2/file1. But the users can get files with right access 775 if the files created.
Any suggestion?

RE: create files on specified directory with right access 775

I think there are some words missing from your enquiry, and to try to guess what they are (and where they should go) might drastically change the meaning.  However, here is some insight into files.

Ignoring ACLs for the moment, when a file is created, its access permissions are more dependent on the environmental settings of the process than the permissions on the directory where it is due to be located.  The process's 'umask' dictates what file permissions are given to a newly created file.  The permissions on the directory only dictate whether the file can be created or not (and the file doesn't usually inherit permissions from the directory it has been placed in).  Using the 'setgid' permission can affect the ownership of files.

For more information see the 'man pages' for:
   umask  acl  setgid
and the file: /etc/default/login


I hope that helps.

Mike

RE: create files on specified directory with right access 775

(OP)
Used umask on /etc/default/login will apply for all directory.
But I want few directories not all.
Everytime users created files on /test/test1/files automatically have a right access 775 not 755. My environment is mixed solaris and linux.
Thanks

RE: create files on specified directory with right access 775

I am still not sure what you are asking (and what you are trying to achieve).  The 'umask' can be changed during a 'login session'.  It may be the time to stop ignoring ACLs.  Have a look at the man pages for 'setfacl' (and 'getfacl') and then experiment to see if ACLs help.  You may even find that using the 'sticky bit' gives you what you are looking for.


I hope that helps.

Mike

RE: create files on specified directory with right access 775

I definitely recommend ACLs for this purpose (if the filesystem you are using supports them).  I only wish they were more widely supported by other OS, filesystems and backup utilities.

Annihilannic.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close