Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
I want to migrate, or better saying, escape from Windows. When you create users in W, an All Users folder is created, where everyone has access to share documents and folders.
Do we have that in Ubuntu? I guess the folder should appear at the same level if the other users' folders, in Home, right?
But even with administrator account-type, I can't create that folder.
You don't have anything like that in linux. If you want to share files with all users on your computer, you will need to create a folder and give it the proper permissions for other users to access it.
You don't have anything like that in linux. If you want to share files with all users on your computer, you will need to create a folder and give it the proper permissions for other users to access it.
Ok, but I can't create a folder inside Home folder, as if it was another user.
If I create the folder inside my home folder, I will be the only one allowed access to it.
As root, create a folder in /home, called anything you want. For full access, chmod the new folder to 777. That will give it read, write, and execute permissions.
As root, create a folder in /home, called anything you want. For full access, chmod the new folder to 777. That will give it read, write, and execute permissions.
Cheers,
Josh
Something to be done in terminal?
Something like
cd ..
sudo mkdir (folder name)
then I could use Nautilus, navigate to that folder, right click and set permissions to everyone? Do I have to be root to do that? perhaps I could do it from Terminal (now the ever asked question: how?)
As root, create a folder in /home, called anything you want. For full access, chmod the new folder to 777. That will give it read, write, and execute permissions.
Cheers,
Josh
I created the folder, when I righ-clicked on it, then Sharing options, I enabled share this folder, then a message said something about Windows networks to be installed, now I see that while the package file are being downloaded, Samba is going to be installed. I thought it was necessary for sharing folders and resources with Windows systems, not between Linux systems.
As root, create a folder in /home, called anything you want. For full access, chmod the new folder to 777. That will give it read, write, and execute permissions.
Cheers,
Josh
I granted permissions
sudo chmod 777 -R /home/compartidos (the name of the folder)
I created a couple of docs which I saved in that folder, then switched user, but those files appear as locked, and open in Read-only mode (of course I closed them in my session).
Do I have to grant permissions to every new file I create/copy there?
sudo chmod 777 -R /home/compartidos (the name of the folder)
I created a couple of docs which I saved in that folder, then switched user, but those files appear as locked, and open in Read-only mode (of course I closed them in my session).
Do I have to grant permissions to every new file I create/copy there?
Well, what you're trying to do is why groups are implemented in most Linux file systems. To illustrate the problem, consider this:
Code:
$ ls -l / | grep home
drwxr-xr-x. 5 root root 4096 Mar 8 12:30 home
$ ls -l /home/
total 8
drwx------. 30 Judy Judy 4096 Sep 30 2009 Judy
drwxrwx---. 78 Peter peter 4096 Mar 8 08:16 Peter
$ sudo mkdir /home/test
[sudo] password for Peter:
$ sudo chmod 777 /home/test/
$ touch /home/test/testing
$ ls -l /home/test/testing
-rw-rw-r--. 1 Peter Peter 0 Mar 8 12:31 /home/test/testing
$ sudo touch /home/test/testing2
$ ls -l /home/test/
total 0
-rw-rw-r--. 1 Peter Peter 0 Mar 8 12:31 testing
-rw-r--r--. 1 root root 0 Mar 8 12:33 testing2
Ignoring the x permission that notes grants of "list" access to directories and "executable" access to files, this shows the following:
Command 1 shows that root can read and write to /home, and that members of the root group can read files in /home.
Command 2 shows that the user "Judy" can read and write files in /home/Judy and members of the "Judy" group have no access to the "Judy" home directory. The second line of the output is, however, slightly different: It shows, as expected, that the user "Peter" can read and write file in /home/Peter, but it also shows that members of the peter group (note the lower-case "p") can also read and write files in /home/Peter
Commands 3 through 8 show what happens when Peter and root create files in the newly created /home/test directory: The file created by Peter read or written to by members of the "Peter" group as well as the (expected) read/write permission the the user "Peter" has.
This illustrates, I think, where you're at in your struggle to let everyone read and execute files in your "compartidos" directory.
Now watch what happens when a "compartidos" group is created and the test files are changed to be members of that group:
Code:
$ sudo lgroupadd compartidos
[sudo] password for Peter:
$ sudo chgrp compartidos /home/test/*
$ sudo chmod g+rx /home/test/*
$ ls -l /home/test/
total 0
-rw-rwxr--. 1 Peter compartidos 0 Mar 8 12:31 testing
-rw-r-xr--. 1 root compartidos 0 Mar 8 12:33 testing2
-rw-r-xr--. 1 Peter compartidos 0 Mar 8 13:51 testing3
$ cat /home/test/testing*
$
(The concatenate command produces no output because the files are all empty. But, note, no error messages were produced.)
So, what I think you need to do is:
Create some group that your "compartidos" users will have as one of their groups.
Change each "compartidos" user to have that group as their primary group.
Change the group membership of any files already in the "compartidos" directory to that of the new group, and
well, what you're trying to do is why groups are implemented in most linux file systems. To illustrate the problem, consider this:
Code:
$ ls -l / | grep home
drwxr-xr-x. 5 root root 4096 mar 8 12:30 home
$ ls -l /home/
total 8
drwx------. 30 judy judy 4096 sep 30 2009 judy
drwxrwx---. 78 peter peter 4096 mar 8 08:16 peter
$ sudo mkdir /home/test
[sudo] password for peter:
$ sudo chmod 777 /home/test/
$ touch /home/test/testing
$ ls -l /home/test/testing
-rw-rw-r--. 1 peter peter 0 mar 8 12:31 /home/test/testing
$ sudo touch /home/test/testing2
$ ls -l /home/test/
total 0
-rw-rw-r--. 1 peter peter 0 mar 8 12:31 testing
-rw-r--r--. 1 root root 0 mar 8 12:33 testing2
ignoring the x permission that notes grants of "list" access to directories and "executable" access to files, this shows the following:
Command 1 shows that root can read and write to /home, and that members of the root group can read files in /home.
Command 2 shows that the user "judy" can read and write files in /home/judy and members of the "judy" group have no access to the "judy" home directory. The second line of the output is, however, slightly different: It shows, as expected, that the user "peter" can read and write file in /home/peter, but it also shows that members of the peter group (note the lower-case "p") can also read and write files in /home/peter
commands 3 through 8 show what happens when peter and root create files in the newly created /home/test directory: The file created by peter read or written to by members of the "peter" group as well as the (expected) read/write permission the the user "peter" has.
This illustrates, i think, where you're at in your struggle to let everyone read and execute files in your "compartidos" directory.
Now watch what happens when a "compartidos" group is created and the test files are changed to be members of that group:
Code:
$ sudo lgroupadd compartidos
[sudo] password for peter:
$ sudo chgrp compartidos /home/test/*
$ sudo chmod g+rx /home/test/*
$ ls -l /home/test/
total 0
-rw-rwxr--. 1 peter compartidos 0 mar 8 12:31 testing
-rw-r-xr--. 1 root compartidos 0 mar 8 12:33 testing2
-rw-r-xr--. 1 peter compartidos 0 mar 8 13:51 testing3
$ cat /home/test/testing*
$
(the concatenate command produces no output because the files are all empty. But, note, no error messages were produced.)
so, what i think you need to do is:
create some group that your "compartidos" users will have as one of their groups.
change each "compartidos" user to have that group as their primary group.
change the group membership of any files already in the "compartidos" directory to that of the new group, and
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.