10-18-2007
Directory Default Permissions
Hi,
I have a directory with files and sub-directories. Users write files to it by using copy/create/tar/ftp etc.
I want this directory to have default permissions of 775 (for its files and sub-dir as well). I tried the below 2 ways but they are not upto my exact requirement so i need a better way of doing it.
1. system-wide umask: it is working only when a file is created (not copied/ftpd etc.) in that directory.
2. CRON job for setting permissions: As there're millions of files, resetting permissions periodically (using cron) found to be impacting on server performance. I tried applying chmod only on the recent files but still it's taking long enough to keep server loaded.
Any solution would highly be appreciated.
TIA
Prvn
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
Is there a way to set the default permissions for a specific directory and all it's files and subdirectories?
For example:
I want the general umask to be
-rwxr-x---
But I want the default for the cgi-bin directory and everything below it to be
-rwxr-xr-x
So that when I put... (3 Replies)
Discussion started by: Thumpasorus
3 Replies
2. Shell Programming and Scripting
From within a directory, how do I determine whether I have write permission for it.
test -w pwd ; echo ?
This doesn't work as it returns false, even though I have write permission. (4 Replies)
Discussion started by: Sniper Pixie
4 Replies
3. UNIX for Dummies Questions & Answers
Read and write bits make sense for a directory but what about the execute permission bit
What does that imply?Is it just a filler?
Saurabh (3 Replies)
Discussion started by: smehra
3 Replies
4. UNIX for Dummies Questions & Answers
Hi ,
I have a situation where plenty of users log in to the same directory and put in files. When they put in the files, I need those files to become group writable (chmod g+w) automatically. I have no control over the users' profiles. Is there a way to do it? (1 Reply)
Discussion started by: praveen_indramo
1 Replies
5. UNIX for Advanced & Expert Users
My users home directory located in a RHEL 5.0 nfs server.
Client is ubuntu 8.1 using NIS for authntication anf NFS for automounting
home Directory on the client side.
I set 700 to the users home directory.
My problem here is some of the users change the mode, which result in leak of... (2 Replies)
Discussion started by: a_artha
2 Replies
6. UNIX for Dummies Questions & Answers
Hi all.
Only one of the following makes any kind of sense as a possible permission field for a UNIX file. Which one?
--w-------
----rwxrwx
-r--------
--rwx-----
----r-----
I think it is no. 3. I dont think it would be 2, because why would you want to give groups and... (1 Reply)
Discussion started by: hawaiifiver
1 Replies
7. UNIX for Dummies Questions & Answers
I'm trying to setup a directory structure for my staff which enables them full access to files in the directories with their name, and have access to anything in the shared directory. The directory structure looks like this:
root@www10 # ls -l
total 56
drwxr-xr-x 7 internal internal 4096... (3 Replies)
Discussion started by: v_greg
3 Replies
8. Shell Programming and Scripting
Hi,
How do i check if I have read/write/execute rights on a UNIX directory?
What I'm doing is checking read access on the files but i also want to check if user has rights on the direcory in whcih these files are present.
if then......
And I check if the directory exists by using... (6 Replies)
Discussion started by: chetancrsp18
6 Replies
9. Solaris
we want to allow user to FTP files into a directory, and then the program (PLSQL) will read and process the file, and then move the file to other directory for archiving.
the user id: uftp1, group: ftp
the program run in oracle database, thus have the user Id: oraprod, group: dba
how to... (2 Replies)
Discussion started by: siakhooi
2 Replies
10. UNIX for Dummies Questions & Answers
i have an application that writes to a directory. let's call the directory:
/var/app/
the permissions of this directory is:
drwxrwxr-x
Now the files that the application creates in this directory usually dont have read permissions for others.
i know there's something called... (3 Replies)
Discussion started by: SkySmart
3 Replies
LEARN ABOUT CENTOS
cgconfigparser
CGCONFIGPARSER(8) libcgroup Manual CGCONFIGPARSER(8)
NAME
cgconfigparser - setup control group file system
SYNOPSIS
cgconfigparser [-h] [-l <filename>] [-L <directory>] [...]
OPTIONS
-h, --help
Displays help.
-l, --load=FILE
Parses the control groups configuration file Sets up the control group file system defined by the configuration file and mounts
mount points defined by the configuration file. The format of the file is described in cgconfig.conf. This option can be used mul-
tiple times and can be mixed with -L option.
-L, --load-directory=DIR
Finds all files in given directory and parses them in alphabetical order like they were specified by -l option. This option can be
used multiple times and can be mixed with -l option.
-a <agid>:<auid>
defines the default owner of the rest of the defined control group's files. These users are allowed to set subsystem parameters and
create subgroups. The default value is the same as has the parent cgroup.
-d, --dperm=mode
sets the default permissions of a control groups directory. The permissions needs to be specified as octal numbers e.g. -d 775.
-f, --fperm=mode
sets the default permissions of the control group files. The permissions needs to be specified as octal numbers e.g. -f 775. The
value is not used as given because the current owner's permissions are used as an umask (so 777 will set group and others permis-
sions to the owners permissions).
-s, --tperm=mode
sets the default permissions of the control group tasks files. The permissions needs to be specified as octal numbers e.g. -f 775.
The value is not used as given because the current owner's permissions are used as an umask (so 777 will set group and others per-
missions to the owners permissions).
-t <tuid>:<tgid>
defines the default owner of tasks file of the defined control group. I.e. this user and members of this group have write access to
the file.
ENVIRONMENT VARIABLES
CGROUP_LOGLEVEL
controls verbosity of the tool. Allowed values are DEBUG, INFO, WARNING or ERROR.
SEE ALSO
cgconfig.conf (5)
Linux 2009-03-16 CGCONFIGPARSER(8)