Solved

ubuntu 10.04 - how to give user access to folder

Posted on 2011-09-10
7
366 Views
Last Modified: 2012-05-12
Hi,

I am the root of my computer and there is a folder at /csd. Unfortunately, everytime i need to access the folder, i need to login as root.
This is the permissions for the folder : drwxr-xr-x    root root

How, I do i change it so that i have read write excute access it . Thanks.
0
Comment
Question by:zizi21
7 Comments
 
LVL 21

Expert Comment

by:Papertrip
ID: 36517863
chown -R yourusername /csd

Open in new window

0
 
LVL 12

Expert Comment

by:Steve
ID: 36517864
chmod 777 csd

that'll give everyone full access to read/write to that folder - INCLUDING anonymous users..

this can be a security risk though if its internet writable.. a 'chmod 775' will give the logged in user write access.. but not anonymous users..

0
 
LVL 21

Accepted Solution

by:
Papertrip earned 500 total points
ID: 36517870
or
chown -R username:groupname /csd

Open in new window

or
chmod 777 /csd

Open in new window




The best option is
chown -R username:groupname /csd

Open in new window

, but you need to know a group you are in, usually your primary group is the best choice but that totally depends on how the files will be accessed/used.

Your primary group should be the first one listed from the command 'groups'
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 21

Expert Comment

by:Papertrip
ID: 36517875
-R is for recursive, so you don't end up just changing ownership/perms on the directory but instead get everything underneath as well.
0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36517883
a 'chmod 775' will give the logged in user write access.. but not anonymous users..

For this situation that will only work if the user is in group 'root'.
0
 
LVL 7

Expert Comment

by:boon86
ID: 36517968
i use:

chown -Rf username:groupname /csd

Open in new window

recursive for each files and folder inside /csd

then chmod +x /csd or chmod 755 /csd

if you plan to use it on web server like nginx or lighttpd, you need to do like this:

First, you had to grant access to your home directory:

setfacl -m u:yourusername:rx /csd


Next, you had to grant access to your static app:

setfacl -R -m u:yourusername:rx /csd

0
 

Author Comment

by:zizi21
ID: 36518673
thanks a million
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can't get /etc/resolv.conf to configure after reboot 8 74
Block sender e-mail address in Postfix 4 66
AWS vpc peering connection 1 43
networking details on centos 6.6 4 52
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

895 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

14 Experts available now in Live!

Get 1:1 Help Now