Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CHMOD file attributes

Posted on 2004-09-23
2
Medium Priority
?
363 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 500 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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.
Suggested Courses

596 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