UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Guys, I am sure this question has been answered a million times, but I cannot for the life of me find a simple answer (I am sure I am to blame )
I got tired of Windows and isntalled Ubuntu. I love it.
I have one problem.
I have only one user, it is called "a" (literally).
I have a home/a/music forder with all my music.
For some reason, root is the only one who has access to some of the files and folders.
Me being a windows guy, I googled around and found the command "gksudo "gnome-open /". I run it and it gives me an error, but it runs a file manager all the same, with root credentials. I know, I know, this is the best way to freak linux guys out. I only have music in this PC, no sercurity risk. Shall Anonymous decide to hack it, I'll just reinstall ubuntu
So, I have the file manager running with root credentials, I select my "music" forlder, select "a" in permisions and choose "a" in all pull downs and create and delete files whenever possible. Apply to all sub folders and files (or something like that). Then I go into the folders and the folders and files's permisions have not been changed.
So I went into some folders and changed it, but the files inside did not change.
Now I have a nightmare of "root", "a", group "a", group "root" (and all that) all over my music and I cannot copy, move or listen to my tunes.
Is there a way to tell linux that "a" AND "root" are to be allowed to do what ever they please with every single file and folder in my musci folder?
If so, please, please, please, put something I can copy and paste in a terminal window, as I am not linux sabby, and things like "run pkNuke on the /rtr main sub-console" means nothing to me but that I have a lot of catching up to do
In your case I guess you could run the following command.
Code:
gksudo gnome-terminal
First you need to take ownership of the files.
Code:
chown -R a:a /home/a
That takes ownership of /home/a folders, subfolders, and files and makes user a (with group a) ownership of the path.
Then you could modify the permissions of your folders.
Code:
find /home/a -type d -print0 | xargs -0 chmod 750
That will give read/write/execute to the owner of all the folders under the path /home/a, read/execute to all groups members (users part of group a), and give no permissions to everyone else.
You could leave the file permissions alone for now and see if modifying the permissions to just the folders resolves your problem.
That's how I would recommend recovering from this dilemma as a start.
In your case I guess you could run the following command.
Code:
gksudo gnome-terminal
First you need to take ownership of the files.
Code:
chown -R a:a /home/a
That takes ownership of /home/a folders, subfolders, and files and makes user a (with group a) ownership of the path.
Then you could modify the permissions of your folders.
Code:
find /home/a -type d -print0 | xargs -0 chmod 750
That will give read/write/execute to the owner of all the folders under the path /home/a, read/execute to all groups members (users part of group a), and give no permissions to everyone else.
You could leave the file permissions alone for now and see if modifying the permissions to just the folders resolves your problem.
That's how I would recommend recovering from this dilemma as a start.
SAM
Did you ever know that you're my hero,
and everything I would like to be?
I can fly higher than an eagle,
'cause you are the wind beneath my wings.
It might have appeared to go unnoticed,
but I've got it all here in my heart.
I want you to know I know the truth, of course I know it.
I would be nothing without you.
Oh, the wind beneath my wings.
You, you, you, you are the wind beneath my wings.
Fly, fly, fly away. You let me fly so high.
Oh, you, you, you, the wind beneath my wings.
Oh, you, you, you, the wind beneath my wings.
You could also look up Linux ACL (or Access Control List) as this is basically what we changed to fix your problem. If you have a security concern with ACLs then I have previously answered a question on this so it's not a bad read.
Don't forget the man pages for a command (which is like running COMMAND /? in Windows). Type "man man" without quotes in the terminal and you'll see what I mean.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.