Newbie: get access privilege

Posted by Mellon on Server Fault See other posts from Server Fault or by Mellon
Published on 2011-12-01T08:24:44Z Indexed on 2011/12/01 9:58 UTC
Read the original article Hit count: 582

Filed under:
|
|
|

I am newbie on Linux Ubuntu machine.

I logged in to the Ubuntu with username: student.

There are some directories only allowed root user to access, for example /var/lib/mysql ,(I know I can use sudo to access but it is not what I want). If I want to get the access privilege on those directories with student account, is it so that I can run the following command :

chown student: PATH_TO_ROOT_USER_PRIVILEGED_DIR

and after that, I can access that directory by using my own account ? am I right?

  • If I am right, then will root user lose the access privilege because I changed it to student user?

  • If I am wrong, please tell me the right solution.

P.S.

please don't concern on what I am going to do on /var/lib/mysql directory, that is only my example, as I mentioned above, I mean generally *for those directories which only have root privilege*, can I use chown to change access privilege and will root user then loose the access because of the change made by chown ? I just wanna know the effect of chown.

© Server Fault or respective owner

Related posts about linux

Related posts about ubuntu