-6
votes
2answers
50 views

How to you create directories and set permission? [on hold]

How do you create three directories in /storage named campaigns, financials, and public. Also, I'm wondering how to set the file access permissions as follows: campaigns – marketing group has full ...
1
vote
1answer
47 views

Only write permission for a directory doesn't allow to rename (move) files inside?

In fact, I would like to ask more general question -- "what does write permission for a directory allow you to do exactly?" -- but let's approach it with a concrete example. It is a long question, if ...
4
votes
2answers
64 views

setting default permissions with setfacl

I am trying to set default permissions on my directory structure using acl. I would like to have following default permissions for directories and for files respectively: drwx--x--- -rw-r----- but ...
1
vote
2answers
38 views

`ls` fails for directory copied from Win and OSX [closed]

I'm not able to ls on a folder that I have just transferred from win7 to OSX via a FAT32 drive. I don't know how to search for an answer for this issue. I've attempted the following: sudo chmod ...
6
votes
1answer
66 views

Expected behavior of `find -depth` if execute permission denied for subdirectory?

I'd like to know if I can rely on the behavior I am seeing when using find with -depth option and user does not have execute permission for a subdirectory. Assume the following directory structure: ...
1
vote
1answer
37 views

Find which directories each group can access

I need to take the /etc/group file (RHEL) and check what high level subdirectories each group has access to. Here is a made up example: Group 100 - \xxx\xxx\xxx Group 150 - \xx\xxxxx\x Is that ...
4
votes
2answers
914 views

Getting new files to inherit group permissions on Linux

I am having a problem with permissions on a Linux server. I am used to BSD. When a directory is owned by a group the user who owns it isn't in such as www-data, files created in it will be owned by ...
2
votes
2answers
33 views

Specialized access control for directories in RedHat

I have a requirement where I want to change permissions for a directory so that the directory owner (user/group) would be able to create files inside the directory and modify them, but won't be able ...
3
votes
2answers
88 views

set umask (permissions) similarly as setgid on a directory

I know how to use setgid on directories, to enforce that whole directory structure has uniform user:group ownership. Is there a similar way to set the umask for a directory, so that the whole ...
2
votes
2answers
305 views

Is a -rw-rw-rw- file really inaccessible inside a drwxrwx— directory?

Say I have a directory with these permissions: drwxrwx--- Inside this directory, a file with these permissions: -rw-rw-rw- Is the file readable/writable by everyone or not ? If not, how secure ...
1
vote
2answers
915 views

Resetting user directory permissions etc [closed]

My "Linux mint Debian edition" installation worked well until I used a live-CD to boot and then copied some files back and forth to and between the hard drive and a usb device. Now it says that it is ...
2
votes
2answers
54 views

Directory permissions vs file permssions

If I have two users called john and sally. Both are part of the users group. john creates a directory with permissions 775. sally then puts a file there with 644 permissions. Even though the file ...
1
vote
1answer
275 views

Process owned by root can't write files

I'm running a program (syslog-ng) that must read and write several files in a given path. It was failing at start, claiming that it is unable to open a file in that path. Please, assume this ...
1
vote
1answer
696 views

mount.cifs not respecting file permissions in Ubuntu 12.04.2 LTS

I am attempting to mount a cifs drive in standard Ubuntu 12.04.2 LTS using the following line in /etc/fstab: //server-name/share-name /mnt/archive cifs ...
6
votes
4answers
365 views

set read and write permissions to folder and all its parent directories

I need to set read and write permissions for root user to directory subfolderN and all its parent folders till root. I can do it by hands: $ sudo chmod +rx /root/subfolder1/subfolder2/subfolderN $ ...
2
votes
1answer
277 views

Allow world access to directory under 0750 directory

I prefer to keep my /home/dotancohen/ directory as permissions 0750. However, I do need Apache to access /home/dotancohen/someProject/public_html/. I know that I could configure the home directory as ...
2
votes
3answers
187 views

Safer way for granting permissions for self user?

I know sometimes we can do chmod 777 so we have a directory at our complete reach for accessing, reading and writing. But usually I prefer to do a sudo chown {myusername} {directory}. Obviously, the ...
4
votes
2answers
216 views

Permissions by path instead of file mode bits

I often find that the unix way of handling file permissions is powerful, particularly when combined with ACLs, but rather difficult to handle. Setting file modes, group ownership and extended ...
2
votes
2answers
600 views

Prevent creating directories but allow creating files

I have a directory shared through Samba. I want users to be able to create/modify/delete files but not create/erase directories. I haven't found a way to do it. Maybe with SELinux? But how?
6
votes
5answers
621 views

Making a directory protected from 'rm -rf'

I just lost some data in folder A which was inside folder B after doing rm -rf B. Before I could realize what have I done, it was all over. Now a lesson is learnt, I wish to make some of my folder ...
3
votes
1answer
1k views

ACL, ls, “permission denied” and a lot of questionmarks

I have two users, Alice and Bob. Bob should be allowed to list, ls, Alice's home directory. Alice also has a file in her home directory that Bob should also be allowed to read. I run these commands ...
1
vote
2answers
3k views

using root to mkdir in another users home directory

having a bit of a difficult time trying to create a folder under another user's /home/devuser1/pubic_html folder. I'm trying to avoid using sudo and looking for an alternative. The permissions on the ...
2
votes
2answers
1k views

Permissions for FTP directory: Inherit directory owner

I am making multiple folders for users (userA/, userB/, etc.) where anyone can create/read a file/folder in any directory (userC can make fileX inside userA/). However, only the directory's owner can ...
1
vote
0answers
220 views

Apache created files and its permissions for CentOS 6.x

In short, I have an authenticated HTTP-POST that: posts a jpg image (created as 666 apache:www) into /directory1 (777 ftpuser:www) creates /directory2 (created as 666 apache:www) in a 777 ...
5
votes
2answers
325 views

Can a user brute-force a directory listing without having read permission on the directory?

I noticed that when a user is working in a directory to which he does not have read permission that using cd produces different error messages, depending on whether or not a subdirectory exists: $ ls ...
2
votes
2answers
257 views

I can not remove folder from server

Accidentall I created the folder on remotely server (Server OS is Linux) using php: mkdir("folder_name",0); Now I can not delete this folder from server. I think this is from permission, because 0 is ...
0
votes
2answers
118 views

Change/Create permissions for a folder

How can I create (if the folder is new) or change (if the folder was already existent) permissions for a folder? In particular, I want to create a subdirectory in /etc/bind/ where I can put the ...
2
votes
1answer
321 views

Hide parent directory but allow to view dir

I would like the following result on my UNIX system: ls -l /users/test -> permission denied, or any other way so I can't see the content of it. ls -l /users/test/testdir/ -> shows all files in the ...
3
votes
2answers
604 views

Why is bash giving me (apparently) conflicting information about a file?

Background I am working on a RHEL 5 cluster. I want my Fortran program to read the file /home/bob/inputs/input_1 I asked Bob to give me permission to read all contents of inputs: [bob@server]$ ...
2
votes
1answer
282 views

How come I can append to files to a directory without write permissions?

I understand this first example: > mkdir foo > chmod u-w foo > touch foo/test touch: cannot touch `foo/test': Permission denied > echo "BAD" >> foo/test bash: foo/test: Permission ...
2
votes
4answers
7k views

How to permanently change the file/directory permission [closed]

How do I change the permission of file/directories such that I am able to create, edit, delete files/directories anywhere in my system? Currently I am using Ubuntu 12.04. I tried sudo chmod 777 -r ...
3
votes
1answer
738 views

Can't rename a directory that I own

I have a directory with a big load of sub directories. I own all of them, and the permissions are all 777. pascal@azazel /box $ ls -al total 147872 drwxr-xr-x 293 root root 12288 aoû 22 19:44 ...
0
votes
1answer
527 views

OSX : rmdir “permission denied” but directory removed

This is a question from a newbie trying to learn UNIX commands. I was trying to test the rmdir command by removing a test directory located in my Downloads directory. I have read and write rights on ...
1
vote
1answer
487 views

How does apache determine what directory to show from public_html?

I am using Ubuntu 12.04 and have configured apache to serve from ~/public_html. I am trying to serve some directory contents over http on LAN. When I did the following: ln -s ...
2
votes
2answers
382 views

execute bit on directories, but not files [duplicate]

Possible Duplicate: How to apply recursively chmod directories without affecting files? What is the command to apply execute permission for directories (for traversal), but leave the ...
2
votes
2answers
246 views

change owner of a file and it's parent directories

I have a file that has 10 parent directories. When I change the file's owner with chown command new owner still can't write to file because the file's parent directories still have a different owner. ...
1
vote
2answers
2k views

do not allow a directory to be deleted but make new files in it?

The question in my assignment says this: create a directory temp with all permissions for everybody, that cannot be deleted and copy hello.sh in this directory giving execution rights for ...
5
votes
1answer
3k views

mv file without write permission to the source file

I just realised that I can move a file that I do not own and don't have write permissions on. I have write permissions to the directory, so I am guessing that is why I could move it, but in this ...
3
votes
3answers
185 views

Permissions for a submission script

I'm a TA for an introductory Python programming class (all work is done from the terminal), and I'm writing a project submission script. Ideally I want a directory setup like this: submissions/ ...
1
vote
2answers
171 views

is setting a 0 permission on a directory an effective way to protect its contents?

Let's say that permissions for user and group are set up correctly on a directory. Would a 0 permission for other on that directory provide effective access control for the directory's files and ...
2
votes
2answers
579 views

Can I share a folder inside my home directory with another user?

Can I share a folder inside my home directory with another user? I have two users on a system, agent and daemon. An external server connects as agent and rsyncs files to ~agent/incoming I want ...
2
votes
1answer
399 views

Why can I copy files to, but not create files in, this directory? [duplicate]

Possible Duplicate: Redirecting stdout to a file you don't have write permission on I'm trying to create an md5sum for an ISO image created with the Ubuntu Customization Kit tools. The ...
3
votes
2answers
677 views

A question about permissions of hierarchical directories

I have some directories, with following permissions: drwxr-xr-x 18 user1 root 4096 Oct 27 11:25 /home/test1/test2 drwxr-xr-x 24 user1 root 4096 Oct 21 08:38 /home/test1 drwxr-xr-x 492 root root 12288 ...
1
vote
1answer
180 views

How to search folder with only x set (execution) permission

I have read that if folder has only x set permission to execute it actually means that you are permitted to search this directory. So how to search it?
82
votes
3answers
28k views

Why do directories need the executable (X) permission to be opened?

In my CMS, I noticed that directories need the executable bit (+x) set for the user to open them. Why is the execute permission required to read a directory?
3
votes
1answer
890 views

Prevent a subdirectory from getting deleted / enforce a directory structure

imagine the following folder structure ../documents ../documents/templates I have two user groups: editors managers Users of both groups should be able to create new files modify any ...
14
votes
3answers
6k views

Is there any way to prevent deletion of certain files from user owned directory?

Let's say user has Directory1 and it contains File1 File2 CantBeDeletedFile How to make so the user would never be allowed to delete the CantBeDeletedFile? If I change the ownership of Directory1 and ...
3
votes
2answers
347 views

Permissions of webserver's root directory

I've had this issue on several setups, and I'm unsure of how to handle it. At first, all of /var is owned by root:root. Clearly I don't want the web directory to be owned by root, so I do chown ...
3
votes
1answer
3k views

In Linux, “Write” Permission Is Equivalent To “Execute” For Directories?

The Execute permission makes sense for files (which include scripts etc), but when it comes to directories, write (w) permission works the same way as execute (x), right? Which means, if we are giving ...
2
votes
1answer
13k views

How to move a file to /usr/local in Ubuntu?

I am working in the most recent Ubuntu in a 64 bit machine. I am currently on the Gnome command prompt and I am trying to move a file under the Downloads directory to /usr/local. However, it gives me ...