Solved

CHMOD file attributes

Posted on 2004-09-23
2
319 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
  • 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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 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.:
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now