You are not logged in.

#1 2016-04-04 15:50:27

asdfiex
Member
From: Eastern Europe
Registered: 2015-12-15
Posts: 71

[SOLVED] Permission denied on a chmodded directory

I've changed the mode bits of the directory so now:

File: '/var/log'
Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 801h/2049d      Inode: 3670023     Links: 7
Access: (0770/drwxrwx---)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-04-04 18:05:28.491646928 +0300
Modify: 2016-04-04 18:13:10.764984232 +0300
Change: 2016-04-04 18:13:10.764984232 +0300
Birth: -

From /etc/group file:

root:x:0:root,florea

I logged in with user florea at the start of computer.
When I'm trying to open the directory using the PCMan file manager I simply get "Error opening '/var/log': permission denied".
Why?

Last edited by asdfiex (2016-04-07 17:15:03)

Offline

#2 2016-04-04 16:30:17

onslow77
Member
Registered: 2014-09-21
Posts: 283

Re: [SOLVED] Permission denied on a chmodded directory

Hello!

asdfiex - I suggest you do the following:
- check the current ownership  of your var and log directory
- If it is not how you like it, simply change the "user" and the "group" to your preference

I also suggest that you read up on file permissions in linux

Regards
Martin

Last edited by onslow77 (2016-04-04 16:34:14)

Offline

#3 2016-04-07 17:14:30

asdfiex
Member
From: Eastern Europe
Registered: 2015-12-15
Posts: 71

Re: [SOLVED] Permission denied on a chmodded directory

So I just found that chmod commands aren't keeped after restart. Good to know!
But that's not all, PCManFM file manager was also reacting strangely ( showing different permissions in the GUI than in the terminal ).
Anyway, now the example above works fine.
Thank you for your tips, onslow77!

Offline

#4 2016-04-08 05:52:44

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] Permission denied on a chmodded directory

asdfiex wrote:

So I just found that chmod commands aren't keeped after restart. Good to know!

What?! Where did you read that?

Offline

#5 2016-04-08 08:00:58

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,452

Re: [SOLVED] Permission denied on a chmodded directory

And why is your normal user part of the root group? You are asking for trouble with a setup like that

Offline

#6 2016-04-08 08:14:42

asdfiex
Member
From: Eastern Europe
Registered: 2015-12-15
Posts: 71

Re: [SOLVED] Permission denied on a chmodded directory

x33a wrote:
asdfiex wrote:

So I just found that chmod commands aren't keeped after restart. Good to know!

What?! Where did you read that?

Here. There says about Ubuntu, but I thought the chmod apply the same on Arch. Also made a test and the permissions aren't keeped after restart.

Offline

#7 2016-04-08 08:23:45

asdfiex
Member
From: Eastern Europe
Registered: 2015-12-15
Posts: 71

Re: [SOLVED] Permission denied on a chmodded directory

V1del wrote:

And why is your normal user part of the root group? You are asking for trouble with a setup like that

I just wanted to have root privileges on my normal user. Removed it finally.

Offline

#8 2016-04-08 08:42:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,452

Re: [SOLVED] Permission denied on a chmodded directory

Offline

#9 2016-04-08 08:43:01

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] Permission denied on a chmodded directory

asdfiex wrote:

Here. There says about Ubuntu, but I thought the chmod apply the same on Arch. Also made a test and the permissions aren't keeped after restart.

I think it only applies to directories and files which are modified after a reboot, like /dev. Since /tmp is a tmpfs, I think it inherits default permissions from somewhere, hence your changes are not sticking. But otherwise, permission and ownership changes are permanent.

Offline

#10 2016-04-08 17:17:06

asdfiex
Member
From: Eastern Europe
Registered: 2015-12-15
Posts: 71

Re: [SOLVED] Permission denied on a chmodded directory

Summarizing, permission and  ownership changes are permanent only if there's no inheritance from God knows somewhere else place.
I chmodded a brand new file on my home and after rebooting the system the changes were kept.

Last edited by asdfiex (2016-04-08 17:17:43)

Offline

Board footer

Powered by FluxBB