LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cant create directory (https://www.linuxquestions.org/questions/linux-newbie-8/cant-create-directory-782892/)

masatheesh 01-18-2010 12:33 AM

Cant create directory
 
Hi,

I set security context for a folder as 702 to enable other users to create and delete folder contents.But whenever other users try to create a folder,its says "Permission denied".Can anyone please tell me the reason?

evo2 01-18-2010 12:44 AM

If you really want everyone to be able to write there you should also let them read (so they can see what file are there) and also execute so they can cd there. If this is what you want then, set it to 777.

Regarding the specifics of your question it may be because those users are in the group that owns the directory, but you have set it to not be group writable.

Evo2.

masatheesh 01-18-2010 12:53 AM

Despite I need only write into that folder,Should I give read and execute permission also?

evo2 01-18-2010 12:59 AM

Quote:

Originally Posted by masatheesh (Post 3830494)
Despite I need only write into that folder,Should I give read and execute permission also?

It's up to you but if you don't, people won't be able to do an ls (requires read) of cd to the dir (requires execute).

Did you confirm if the writing problem was because of the group?

Evo2.

masatheesh 01-18-2010 01:36 AM

Thanks for your replies.


Yes, I have checked with group permission.This folder is not folder level security context.I want to give write permission only to all users.All users dont want to do ls and cd to this directory.

evo2 01-18-2010 01:51 AM

Quote:

Originally Posted by masatheesh (Post 3830525)
Yes, I have checked with group permission.

Um, so what was the outcome?

Quote:

This folder is not folder level security context.I want to give write permission only to all users.All users dont want to do ls and cd to this directory.
Ok, well assuming that the group was the problem (but I don't know because you haven't said), then permissions 722 should do what you want.

Evo2.

masatheesh 01-18-2010 02:41 AM

output is "mkdir: cannot create directory : Permission denied".I want to set the permission as 702.

evo2 01-18-2010 03:13 AM

Quote:

Originally Posted by masatheesh (Post 3830567)
output is "mkdir: cannot create directory : Permission denied".I want to set the permission as 702.

That in no way constitutes checking the group permissions.

That would be done with:

Code:

ls -ld /path/to/public/directory
group username

where "username" is the name of a user who can't write to that directory.

Evo2.

masatheesh 01-18-2010 03:30 AM

This is the output

drwx---rw- 3 root root 4096 Jan 18 12:34 Test/

check: users

evo2 01-18-2010 03:58 AM

Ok, seems not to be related to groups.

What happens if you make the directory executable (eg chmod 707 of 777), like I originally suggested?

Evo2.

masatheesh 01-18-2010 04:36 AM

If I set it as 707 or 703,It allows to create folder.But my doubt is,why execute permission is required even only write?

evo2 01-18-2010 04:53 AM

I know that execute permissions are required to enter the directory, I guess it seems logical that to write to a directory, on some level you would need to enter it. I'm sure a proper answer could be found somewhere in some unix documentation.

Good luck,

Evo2.


All times are GMT -5. The time now is 07:13 PM.