chmod will not drwxrw----


 
Thread Tools Search this Thread
Operating Systems Linux chmod will not drwxrw----
# 1  
Old 10-11-2011
chmod will not drwxrw----

If I:
chmod 740 Documents/
Documents/ = drwxr-----

If I:
chmod 750 Documents/
Documents/ = drwxr-x---

How does that work?

I want to achieve drwxrw----
# 2  
Old 10-11-2011
From the man page of chmod:
Quote:
A numeric mode is from one to four octal digits (0-7), derived by adding up the bits with values 4, 2, and 1. Omitted digits are assumed to be leading zeros. The first digit selects the set user ID (4) and set group ID (2) and restricted deletion or sticky (1) attributes. The second digit selects permissions for the user who owns the file: read (4), write (2), and execute (1); the third selects permissions for other users in the file's group, with the same values; and the fourth for other users not in the file's group, with the same values.
So you just have to add up the digits for each permission you want. For rw- that would be 4 (read) + 2 (write) = 6
# 3  
Old 10-11-2011
awesome explanation pludi .. Smilie
# 4  
Old 10-11-2011
Cool. I still don't know what's going on.

Moderator's Comments:
Mod Comment Check your language, thanks. You got a PM.

Last edited by zaxxon; 10-11-2011 at 04:58 AM.. Reason: language
# 5  
Old 10-11-2011
Code:
chmod 760 Documents

This will achieve the drwxrw---- , but setting the "w" without setting the "x" on a directory seems very weird
# 6  
Old 10-11-2011
Quote:
Originally Posted by Kolusion
Cool. I still don't know what's going on.
Let me guess: you expected a complete solution to your problem, without any thinking required on your part. If so, you've come to the wrong place. We try to encourage & train problem solving, giving hints at the way to reach a solution.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

chmod

Hi I tried to use chmod in unix to change my file's permission. chmod 701 hello.cgi And it did change my desired file's permission. Yet, the name of the file is changed to hello.cgi* . And therefore I cannot compile it after that. So, I just wondering why there is an extra '*' in the file's... (2 Replies)
Discussion started by: alvin8906
2 Replies

2. UNIX and Linux Applications

What is the difference between chmod in solaris and chmod in Linux?

i think it is the same in both... Iam i right? (1 Reply)
Discussion started by: sumaiya
1 Replies

3. UNIX for Advanced & Expert Users

chmod question

I have two files,like follows: $ls -l foo bar -rw------- bar -rw-rw-rw- foo Then I execute follow code: chmod("foo",(statbuf.st_mode & ~S_IXGRP) | S_ISGID) chmod("bar",S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) Then I view the result $ls -l foo bar -rw-r--r-- bar... (1 Reply)
Discussion started by: konvalo
1 Replies

4. UNIX for Dummies Questions & Answers

CHMOD problems... Help!

Hey. I was playing somethink with chmods, and then i did chmod -R 755 / :eek: so linux but with errors and sshd not working .... Can some one give me proper chmods or better script that will do it. pls help fast (7 Replies)
Discussion started by: net555
7 Replies

5. UNIX for Dummies Questions & Answers

CHMOD Question

I've always been fascinated by permissions and I have a question. Since the shell isn't a "virtual environment" (like say a web forum, where permissions can be enforced with absolute confidence), what's actually keeping an unauthorized user from viewing a CHMODed file? The read/write routines? Why... (1 Reply)
Discussion started by: froth
1 Replies

6. UNIX for Dummies Questions & Answers

CHMOD query

Hi peeps, I'm new here, so I hope I'm posting in the right place... If I'm in a particular directory and I run the command 'CHMOD * 777' (or the other way around- I can't remember), am I right in saying it will only change the permissions of all the immediate files and directories and not... (1 Reply)
Discussion started by: jsp_1983
1 Replies

7. UNIX for Dummies Questions & Answers

chmod...

Hey everyone, I was wondering if there was a quicker way to chmod a lot of files than doing what im currently doing. At the moment, im doing chmod 777 *filename* - but I have a lot of files, sub-directories, sub-files etc etc. And at the moment I see I have to chmod every single file... (3 Replies)
Discussion started by: mo0ness
3 Replies

8. UNIX for Dummies Questions & Answers

chmod

Hi, can anybody help me? i have probable a simple problem about permissions. i have a server and on this server there comes some files from a another server via ftp with a separte user. i would like to modify the files with a awk script but i donīt have the permissions to modify the... (3 Replies)
Discussion started by: scotty
3 Replies

9. UNIX for Dummies Questions & Answers

Chmod Help!

Here is the deal, I am good with html and java and am creating a website for my brother. On this site he has chosen to use a ikonboard.com discussion board. I have done everything I can to pull it off, but no can do. Here is the problem: The site is being created using the angelfire... (12 Replies)
Discussion started by: xwfprez
12 Replies

10. UNIX for Dummies Questions & Answers

CHMOD Help!!

Ok, listen.........I was using FTP Works to remove and add some files to a domain server. I messed with chmod button and made it so that no-one could access or their browsers could execute files and 2 or three certain directories. If anyone knows how to use this command and will give me a heads up... (2 Replies)
Discussion started by: jarrell
2 Replies
Login or Register to Ask a Question