Solved

linux how to change rights on a folder

Posted on 2014-02-04
1
773 Views
Last Modified: 2014-02-04
I have this folder

 ls -ld sap

drwxr-xr-x 10 root sapsys 4096 Jan  9 23:06 sap

I need to change rights to pipadm,sapsys  ( get rid of root )

Do i need to use chmod command ? Any help would be appreciated
0
Comment
Question by:c_hockland
1 Comment
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 39833077
As root:

chown pipadm:sapsys sap

If you want to change the owner of everything below the "sap" subdirectory, too, then use the recursive flag of "chown" ("-R"):

chown -R pipadm:sapsys sap

"chown" means "change owner". The value on the left of the colon designates the new owner, the value on the right designates the new group. Either one can be omitted, if no change is desired or required. To change only the group its name must thus be preceeded by the colon.

"chmod" , on the other hand, means "change modes" and is used to change permissions (read/write/execute for owner, group, others).
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

Suggested Solutions

Title # Comments Views Activity
capture pcap with filtered traffic 1 61
php ssh2_scp_send 1 61
AWS ELB 5 77
winscp 000webhost.com 6 50
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

770 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