Solved

CHMOD file attributes

Posted on 2004-09-23
2
351 Views
Last Modified: 2010-05-18
I have a file that I would like to do the following to.  
Allow the owner to read
Allow the owner to write
Allow the owners group to read.  

Would it be chmod 640 file.txt  

Owner to read  400
Owner to write  200
Owners group to read  040
Rest of world do do nothing  

Add these together and one obtains 640.  
The question is first of all is this the correct syntax and if I want to give no permissions to everyone else
is this 0?  

0
Comment
Question by:plate55
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 11

Accepted Solution

by:
griessh earned 125 total points
ID: 12135039
Hi plate55,

chmod 460 does what you want. There are different ways to use the chmod command. In case of any problems do a 'man chmod' and you will see all the options.

======
Werner
0
 
LVL 11

Expert Comment

by:griessh
ID: 12135045
Sorry
460 sould be 640
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question