Solved

Permissions on Directories

Posted on 1998-07-30
3
252 Views
Last Modified: 2013-12-27
How would I set the permissions on a directory/file from the command line on a Sun Solaris 2.5 station ?
i.e. Changing the permissions from drwxr-xr-x to drwxrwxrwx.  Logging in as root or any Super user......

Thanks
0
Comment
Question by:mpellowe
3 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 2009174
man chmod
chmod go+w
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 2009175
And the pure UNIXish way:
  chmod 777
0
 
LVL 1

Accepted Solution

by:
bryanjones earned 50 total points
ID: 2009176
If you are creating a new directory and want to keep it drwxrwxrwx then in your .profile ( that is if you use Korn shell or Bourne Shell, KORN the chosen shell of admins.), place umask 022 this will at least get you the following drw-rw-rw-.  If you need to change a file that already exists use the chmod command as follows;

chmod 777 <filename> (for the rwxrwxrwx)
4 = r
2 = w        to get the appropriate settings add the number together for what you want
1 = x
---------
7 = rwx

d rwx rwx rwx
    |       |      |
  owner |      |
         group |
                 world

or the other way to make the information correct is to chmod <ugo>+/-(rwx)
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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.

825 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