Link to home
Start Free TrialLog in
Avatar of Victor Kimura
Victor KimuraFlag for Canada

asked on

Change Linux folder permissions (recursive) for one user

Hi,

I'd like to change the folder permissions to something like 755 for the folder /var/lib/mysql for the user "vkimura". What's the linux command to do this? I have a Centos and Ubuntu machine. Are they the same command?

So something like this:
chmod [-R] ### <filename or directory>

but specifically apply this command to only a user. I have to use su - to do this.

Thanks,
Victor
SOLUTION
Avatar of farzanj
farzanj
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Victor Kimura

ASKER

Hi farzanj,

Thanks, that's helpful.

But I don't want to chown. The user mysql owns  the files and folder in /var/lib/myql but I want to keep it the same owner. I just wish to add my user 'vkimura' so that vkimura can also read, write, execute the files/folder in /var/lib/mysql.

Is there a way to do this? If I add vkimura to the group (also mysql) that owns /var/lib/mysql then won't vkimura also have access to to everything that the user mysql has access too? Instead, I only wish for vkimura to have read/write/execute permissions on /var/lib/mysql. How do I do this if it's possible?

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your help.