Solved

linux how to change rights on a folder

Posted on 2014-02-04
1
776 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need BIOS update Linux for MSI X99A motherboard. 4 53
How code a 301 redirect for folder files -> 1 file 2 58
Remote desktop Ubuntu from Windows 10 5 98
bash file 10 51
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.:

820 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