The Navigatrix has been updated. The new website can be found at navigatrix.net.




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Permissions issue

Joined: 20 Jul 2014, 17:42
Posts: 19
NX gang,

Finally have my home network set up with multiple computers. It's just the way I want it now I think. Not too much blood and guts on the floor. BUT I need to set up directories in two data partitions from within NX and I am denied permissions. Changed my status to administrator in user info. No joy. Tried to copy and paste the directory in. No joy.

What am I missing? A lot actually since I am still a newbie. Always will be compared to the talented heavyweights here. I have researched some but the Unix stuff makes my head swim after about 20 minutes. If possible I would prefer an easy fix...advice...maybe even terminal entries if needed.

Hope you are all well and the weather is nice.

Jan (Growngfree)


Top
   
 
 Post subject: Re: Permissions issue

Joined: 04 Nov 2010, 20:51
Posts: 1062
I'm sick, overworked and in the middle of a winter storm, just so you know.

But what you are looking for is to become root, I'm not exactly sure what this administrator settings are except becoming a member of a group.

Everything falls into three user based permission groups:

  • owner - The Owner permissions apply only the owner of the file or directory, they will not impact the actions of other users.
  • group - The Group permissions apply only to the group that has been assigned to the file or directory, they will not effect the actions of other users.
  • world - The World permissions apply to all other users on the system, this is as the 'outside' world or another user on a multi-user system would see the file/directory.
You can see to which group you belong with
Code:
groups
Quote:
moe@len:~$ groups
moe adm dialout fax cdrom floppy tape sudo audio dip video plugdev fuse lpadmin netdev scanner nopasswdlogin sambashare debian-tor
moe@len:~$
I am, and most likely you are a member of those same/similar groups (except the 'moe' group. But there are other groups.

Take a look at group membership
Quote:
moe@len:~$ cat /etc/group
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:syslog,moe
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:gsmsms,moe
fax:x:21:moe
voice:x:22:
cdrom:x:24:moe
floppy:x:25:moe
tape:x:26:moe
sudo:x:27:moe
audio:x:29:pulse,moe
dip:x:30:moe
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:moe
sasl:x:45:
plugdev:x:46:moe
staff:x:50:
games:x:60:
libuuid:x:101:
crontab:x:102:
syslog:x:103:
fuse:x:104:moe
messagebus:x:105:
ssl-cert:x:106:
lpadmin:x:107:moe
netdev:x:108:moe
ntp:x:109:
mlocate:x:111:
ssh:x:112:
utempter:x:113:
bluetooth:x:114:
lightdm:x:115:
nopasswdlogin:x:116:moe
sambashare:x:117:moe
winbindd_priv:x:118:
debian-tor:x:119:moe
rtkit:x:120:
avahi:x:121:
iocard:x:122:
pulse:x:123:
pulse-access:x:124:
kvm:x:125:
gsmsms:x:126:
users:x:100:
scanner:x:110:moe
nogroup:x:65534:
moe:x:1000:moe
moe@len:~$
I don't know what some of these groups do. Some are residual(legacy) like your appendix. Some are essential, but esoteric. But I can tell you what it some of it means.

Permissions are organised into those three classes, user, group, and world. The use of groups allows additional abilities to be delegated in an organised fashion, such as access to disks, printers, and other peripherals. Administrator is one such group. It just might not be the 'right' group for the task.

Multiple users are categorized into groups. This file (/etc/group) lists those groups to which users belong. This controls the access (and potential damage) to those files/directories/capabilities and enables the root (superuser) to delegate some administrative tasks to normal users.

The file /etc/groups stores group information and defines which groups which user belong. There is one entry per line, and each line has the following format (all fields are separated by a colon (:)


Code:
audio:x:29:pulse,moe
_____ _  _   _____
  |   |  |      |
  |   |  |      |
  1   2  3      4


Where,
  1. group_name: It is the name of group. If you run ls -l command, you will see this name printed in the group field.
  2. Password: is there an encrypted password.
  3. Group ID (GID): Each user must be assigned a group ID. You can see this number in your /etc/passwd file. (cat /etc/passwd)
  4. Group List: It is a list of user names of users who are members of the group. The user names, must be separated by commas. Here in this audio group is the pulseaudio daemon and myself

So what does this mean?

If you are not the owner of the file/directory your options to read/write/execute are defined by the permissions of that file/directory...unless you are a member of a group that has different permissions.

If you are not a the owner, or a member of a group, there is no way you can modify(delete/add), or in some cases even read or execute a file or a command on a file/directory unless you are the owner or member of the group that has permission.

So what are you going to do?

Fake it.

There is a command called sudo. Think of it as SuperUser DO <whatever>. If you preface most any command (there are exceptions) you have the power of root to alter/view/execute essentially anything on the system. This is really handy sometimes. But it also means you can also render the system inoperable, which is not as handy.

You've seen this working on other areas. For example, to remove the redirect (sudo medit /usr/lib/firefox/mozilla.cfg). You wouldn't have the permission to modify the file /usr/lib/firefox/mozilla.cfg without prefixing sudo to the command, and knowing the sudo password.

This applies to the working with any file, directory, or whatever that you either do not own or are a member of the group that has permission to do <whatever>.

Now, you could be brave and daring and do all this stuff through the command line and terminal. Or, you could use sudo to call up one of your favourite user interfaces to do the same thing. For example, sudo pcmanfm to have a root power File Manager to do good, or play Godzilla on your Tokyo. It's your choice.

I'm not sure what you're trying to do on your network, but that should get you headed in the right direction.


Top
   
 
 Post subject: Re: Permissions issue

Joined: 04 Nov 2010, 20:51
Posts: 1062
Ok, for funzies, root created a 357 bite file called example.file in the /home directory.
Quote:
moe@len:~$ cd ..
moe@len:/home$ ls -l
total 28
drwxrwxrwx 6 moe moe 4096 Aug 1 22:53 Charts
-rw-r--r-- 1 root root 357 Aug 18 13:27 example.file
drwx------ 2 root root 16384 Aug 1 22:49 lost+found
drwxr-xr-x 69 moe moe 4096 Aug 18 10:46 moe
drwxrwxrwx 11 moe moe 4096 Aug 16 23:45 Music
moe@len:/home$
The directories are listed with a d (Charts, Music, "my" home directory, and lost+found).

The 'r','w','x', or '-' are grouped to reflect the user/group/world permissions to read, write, or execute the file/directory.

As you see, the Charts directory is readable/writeable/executable for anybody.

The example.file is readable/writeable for the owner (root); readable for the group (also the 'root' group) and readable to the world.

The directory lost+found has full permissions for the owner (root), but is inaccessible to the rest of the planet, even members of the root group.

Whereas my home directory can be read and the files executed by everyone. But Members of the 'moe' group do not have the ability to modify/delete the directory or its contents, only the owner (moe) and a superuser.

To make life more complicated (or easier) there is also octal representation of those permissions. I do recommend https://en.wikipedia.org/wiki/File_system_permissions for an over view.


Top
   
 
 Post subject: Re: Permissions issue

Joined: 20 Jul 2014, 17:42
Posts: 19
What a generous response! Especially from a sick, overworked and storm-afflicted man. May all your beasties subside post haste!!!

I have to smile. You are acting/being "a good dad," explaining a lot, pointing me in the right direction for more instruction but not just giving me the "magic words." Always with terminal before, except in the dos days, when I was a bit more handy, I have done monkey see monkey do on it. Someone gave me the pattern and I basically cut and pasted for big things, reproduced in simpler ones. It is absolutely time I move into a more competent stage, especially since I am planning to be "out there" where immediate help might not be close at hand.

One more silly question: How do I become owner of my own computer??? You don't have to answer from your sick bed. This one can wait.

Jan (growngfree)


Top
   
 
 Post subject: Re: Permissions issue

Joined: 20 Jul 2014, 17:42
Posts: 19
Is there a program that makes this easier, i.e. dconf-editor?


Top
   
 
 Post subject: Re: Permissions issue

Joined: 04 Nov 2010, 20:51
Posts: 1062
And so it goes. Just like everything else, once you understand the storyline, it's easier to follow the opera.

While sometimes magic incantations are just the trick, and I like magic, it's nice understand what's going on.

Your asking the coming of age question of who 'owns' the computer system.

I am uid=1000(moe) gid=1000(moe) groups=1000(moe) (try it, id at the prompt), and I belong to some groups that does things.

The machine is its own thing/being/entity. root is in charge. It handles a lot of stuff that we're better off not messing with. We are just 'users' on a multi-user system. Most of the other users, and they are there, are not human, and they do things behind our backs. This is a good thing.

We can ask questions with apropos <whatever>.

If we get a hit, a clue, or a curiosity we can, man <whatever>.

When we can't understand what is in the manual, we search the internet for the magic.

When we don't find it and feel like a dog chasing our tails from site after site of the same stuff that doesn't seem to answer the question about this problem, on this <machine> we might have beaten enough jargon into our heads that we end up looking at the documents usually already on the machine down the directory tree of /usr/share/doc/..., or read the manual until it make sense.

...but magic is good too.

growngfree wrote:
Is there a program that makes this easier, i.e. dconf-editor?
This is when I think of the Cheshire Cat when Alice ask asked for directions.

It depends a great deal on where you wish to go.

I'm all for easier. I'm just not sure what you are trying to do.


Top
   
 
 Post subject: Re: Permissions issue

Joined: 29 Apr 2013, 06:05
Posts: 36
One way to use the GUI to handle permissions is to right click on a file in PCmanFM -> Permissions. So, as suggested by Moe, start PCmanFM with sudo pcmanfm and then alter the permissions of the directories yoiu nwant to fiddle with. Be careful tho, you can really bork your system with a file manager with root permisssions, so don't delet stuff accidentally.
All the best,
Christian


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 


Search for:
cron

Credits © 2010 - 2024