Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Do UNIX Permission apply to sub directories? Post 302501313 by Grueben on Thursday 3rd of March 2011 09:45:38 AM
Old 03-03-2011
Do UNIX Permission apply to sub directories?

Hi Guys,

Can you tell me if unix permissions apply to sub dirs?

Dir is /home/ops/batch/files/all

/home is rwxrwxrwx
ops is rwxrwxrwx
batch is rwxr-wr-w
files is rwxrwxrwx
all is rwxrwxrwx

Having problems writing to all (does the userid nee to be the batch owner i.d or root level?)

Cheers
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Change permission for directories and files

Is there a way to change subdirectories permission plus the files in the subdirectories in a directory i specified without using the find command? (1 Reply)
Discussion started by: mingfei2006
1 Replies

2. Shell Programming and Scripting

Giving write permission to multiple directories

Hi, i am having following directory structure Folder1 -> Folder2 -> Folder3 Folder4 Folder5 Now i am at top level and want to assign write permission to all the folder & files in it. i am... (3 Replies)
Discussion started by: sarbjit
3 Replies

3. Shell Programming and Scripting

Re-apply the file permission

Hi, I having an issue with file permission. To fix it I need to read the file's existing permission and re-apply the same permission to the file. This has to be done for every single file under a mount point. I'm novice in scripting. Help me with this in shell scripting. # ls -l /dev/null... (10 Replies)
Discussion started by: agent001
10 Replies

4. UNIX for Dummies Questions & Answers

Highlight directories in path with execute permission for others

Hi all, I'm trying to make a script that takes at the most one argument and lists all directories in the path in a special format: User Group Other Filename rwx r-- r-x \ rwx r-x r-- home This is my code as it is... (1 Reply)
Discussion started by: Trinimini
1 Replies

5. Shell Programming and Scripting

Apply file permission

Hi All, I would like to read the permission from a file and wanted to apply the same permission to another file. say for example, f1 755 first...i have to read the permission type (which is differ for each file) and need to apply the same for f2 a1 666 i have to get this... (5 Replies)
Discussion started by: karthi_mrkg
5 Replies

6. Shell Programming and Scripting

Finding the directories with same permission and then apply some default UNIX commands

HI there. My teacher asked us to write a code for this question Write a Unix shell script named 'mode' that accepts two or more arguments, a file mode, a command and an optional list of parameters and performs the given command with the optional parameters on all files with that given mode. ... (1 Reply)
Discussion started by: femchi
1 Replies

7. Homework & Coursework Questions

Finding the directories with same permission and then apply some default UNIX commands

Write a Unix shell script named 'mode' that accepts two or more arguments, a file mode, a command and an optional list of parameters and performs the given command with the optional parameters on all files with that given mode. For example, mode 644 ls -l should perform the command ls -l on all... (5 Replies)
Discussion started by: femchi
5 Replies

8. Shell Programming and Scripting

awk to match and apply condtions to matchijng files in directories

I am trying to merge the below awk, which compares two files looking for a match in $2 and then prints the line if two conditions are meet. awk awk 'FNR==NR{A=$0;next} ($2 in A){if($10>30 && $11>49){print A}}' F113.txt F113_tvc.bed This code was improved and provided by @RavinderSingh13,... (18 Replies)
Discussion started by: cmccabe
18 Replies

9. Solaris

Giving read write permission to user for specific directories and sub directories.

I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. This is for Solaris. Please help. (1 Reply)
Discussion started by: blinkingdan
1 Replies
MOUNT_UNION(8)						    BSD System Manager's Manual 					    MOUNT_UNION(8)

NAME
mount_union -- mount union filesystems SYNOPSIS
mount_union [-b] [-o options] directory uniondir DESCRIPTION
The mount_union command attaches directory above uniondir in such a way that the contents of both directory trees remain visible. By default, directory becomes the upper layer and uniondir becomes the lower layer. Both directory and uniondir are converted to absolute paths before use. The options are as follows: -b Invert the default position, so that directory becomes the lower layer and uniondir becomes the upper layer. However, uniondir remains the mount point. -o Options are specified with a -o flag followed by a comma separated string of options. See the mount(8) man page for possible options and their meanings. Filenames are looked up in the upper layer and then in the lower layer. If a directory is found in the lower layer, and there is no entry in the upper layer, then a shadow directory will be created in the upper layer. It will be owned by the user who originally did the union mount, with mode "rwxrwxrwx" (0777) modified by the umask in effect at that time. If a file exists in the upper layer then there is no way to access a file with the same name in the lower layer. If necessary, a combination of loopback and union mounts can be made which will still allow the lower files to be accessed by a different pathname. Except in the case of a directory, access to an object is granted via the normal filesystem access checks. For directories, the current user must have access to both the upper and lower directories (should they both exist). Requests to create or modify objects in uniondir are passed to the upper layer with the exception of a few special cases. An attempt to open for writing a file which exists in the lower layer causes a copy of the entire file to be made to the upper layer, and then for the upper layer copy to be opened. Similarly, an attempt to truncate a lower layer file to zero length causes an empty file to be created in the upper layer. Any other operation which would ultimately require modification to the lower layer fails with EROFS. The union filesystem manipulates the namespace, rather than individual filesystems. The union operation applies recursively down the direc- tory tree now rooted at uniondir. Thus any filesystems which are mounted under uniondir will take part in the union operation. This differs from the union option to mount(8) which only applies the union operation to the mount point itself, and then only for lookups. EXAMPLES
The commands mount -t cd9660 -o ro /dev/cd0a /usr/src mount -t union /var/obj /usr/src mount the CD-ROM drive /dev/cd0a on /usr/src and then attaches /var/obj on top. For most purposes the effect of this is to make the source tree appear writable even though it is stored on a CD-ROM. The command mount -t union -o -b /sys $HOME/sys attaches the system source tree below the sys directory in the user's home directory. This allows individual users to make private changes to the source, and build new kernels, without those changes becoming visible to other users. Note that the files in the lower layer remain accessible via /sys. SEE ALSO
intro(2), mount(2), unmount(2), fstab(5), fsck_ffs(8), mount(8), mount_null(8), sysctl(8) HISTORY
The mount_union command first appeared in 4.4BSD. BUGS
Without whiteout support from the filesystem backing the upper layer, there is no way that delete and rename operations on lower layer objects can be done. An attempt to mount a union directory under one which does not have whiteout support will return EOPNOTSUPP ("Operation not supported"). Whiteout support can be added to an existing FFS filesystem by using the -c option of fsck_ffs(8). Running find(1) over a union tree has the side-effect of creating a tree of shadow directories in the upper layer. BSD
February 5, 2008 BSD
All times are GMT -4. The time now is 08:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy