Dir permissions


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Dir permissions
# 1  
Old 09-03-2010
Dir permissions

Hi All,

I have a script which will be run by another user say user 2 which will create a new dir say dir 4 in my work place and copy certains files from his dir.

/t1/t2/t3/dir4

I want to allow the user to create the dir dir4 and copy the files,but bring the control back to my name say user 1 after it is copied.

No one else should be able to do any action in the dir right after the copy is finished.

How to do this?What folder permissions should i set?
# 2  
Old 09-03-2010
Giving someone permission to create directories in your workspace would give them access to delete files in your workspace too. I'd create a directory inside your workspace to give him access to instead, with 2770 permissions, belonging to a group that only you and this user belong to. You will both have access to create and delete files in this directory but he won't have write access to the rest of your workspace, and everything created in it will belong to the same group as the directory because it's set g+s.

Make sure he sets his umask 0007 in order to make files and directories he creates group-writable.
# 3  
Old 09-03-2010
Quote:
Originally Posted by Corona688
Giving someone permission to create directories in your workspace would give them access to delete files in your workspace too.
actually this can be avoided with the sticky bit assuming the individual files in the sub directory are not writable by group or other permissions.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Assign read write permission to the user for specific dir and it's sub dir and files in AIX

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. I do not want to assign user the same group of that directories too.... (0 Replies)
Discussion started by: blinkingdan
0 Replies

2. Shell Programming and Scripting

Help- writing to dir with no write permissions (script)

hello, I have a question regarding the below script.. I just simply trying to write to a file in directory that does not have write permissions but this is failing .. it still writes to it regardless .. Many thanks in advance.. #!/bin/bash #check if dir exists, if so write to it ... (5 Replies)
Discussion started by: Reb0rn
5 Replies

3. Shell Programming and Scripting

Have files take on DIR permissions

Hello all; I have a question based on a ticket I have from a user... K...first some background...this client needed a generic user setup to allow them to ftp files; user is called "msifpt"...so here's what they want to do now with this account: 1. Client will use the user id ‘msiftp'... (1 Reply)
Discussion started by: gvolpini
1 Replies

4. Shell Programming and Scripting

KSH - Find paths of multiple files in CC (dir and sub-dir))

Dear Members, I have a list of xml files like abc.xml.table prq.xml.table ... .. . in a txt file. Now I have to search the file(s) in all directories and sub-directories and print the full path of file in a output txt file. Please help me with the script or command to do so. ... (11 Replies)
Discussion started by: Yoodit
11 Replies

5. UNIX for Dummies Questions & Answers

Creating a File system with required permissions for all DIR's created in

Hello All, I am application admin. I need to clear all the temporary files cleared by the applications. I need help/suggestion that is there any way to create a file system such that every Dir created in by any user will have 775 permissions. So, that i can simply clear the temporary file which... (6 Replies)
Discussion started by: firestar
6 Replies

6. Shell Programming and Scripting

A script to find dir, delete files in, and then del dir?

Hello!! I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory: drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Discussion started by: bigben1220
3 Replies

7. UNIX and Linux Applications

CPIO Problem, copy to the root dir / instead of current dir

HI all, I got a CPIO archive that contains a unix filesystem that I try to extract, but it extract to the root dir / unstead of current dir, and happily it detects my file are newer otherwise it would have overwrited my system's file! I tried all these commands cpio -i --make-directories <... (2 Replies)
Discussion started by: nekkro-kvlt
2 Replies

8. Shell Programming and Scripting

Shell Script to save/restore files and dir permissions

Hello all: I need found script to save and restore file permissions and owner:group... this is for backup my server... I have one problem in my server and file permissions and owner:group, mess up.. For this reason i need found one way to secure this aspect of the server... Thanks! (1 Reply)
Discussion started by: joangopan
1 Replies

9. Shell Programming and Scripting

a script to clone a dir tree, & overwrite the dir struct elsewhere?

hi all, i'm looking for a bash or tcsh script that will clone an empty dir tree 'over' another tree ... specifically, i'd like to: (1) specify a src directory (2) list the directory tree/hiearchy beneath that src dir, w/o files -- just the dirs (3) clone that same, empty dir hierarchy to... (2 Replies)
Discussion started by: OpenMacNews
2 Replies

10. UNIX for Dummies Questions & Answers

File and Dir permissions

I would like to configure my SuSE 7.0 workstation more securely. I have attempted for about two weeks to find a guideline on good practices for the file and directory permissions.........but to no avail. Does anyone have a guideline that I could use to help me out. I realize that the distros are... (11 Replies)
Discussion started by: thomas.jones
11 Replies
Login or Register to Ask a Question