You are not logged in.

#1 2012-07-02 19:24:13

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Issues with permissions

Sometimes, when I'm updating a package, i get a message like, i.e.:

Different file permissions for /xxx/xxx
Package: 777
Disk (or filesystem, i can't remember): 755

What is the common way to approach this issue?
Should I chmod the directory recursively or the files so the permissions will be the ones of the package?

Is there any utility for fixig the overall system's permissions?, AFAIK, fsck checks other type of errors.......... which maintenance procedures should i periodically do to ensure the system's health?

Thanks!

Offline

#2 2012-07-02 19:50:31

bohoomil
Banned
Registered: 2010-09-04
Posts: 2,377
Website

Re: Issues with permissions

I don't think you should fix anything. Sometimes permissions are changed for specific directories during pkg upgrade, and as long as you don't change the / filesystem permissions manually, things shouldn't go wrong.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#3 2012-07-02 20:23:12

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Issues with permissions

Can you post the exact message? You can find it in the log.
I recently got

[2012-06-22 19:16] warning: directory permissions differ on var/games/
filesystem: 755  package: 775

Offline

#4 2012-07-02 20:30:02

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: Issues with permissions

karol wrote:

Can you post the exact message? You can find it in the log.
I recently got

[2012-06-22 19:16] warning: directory permissions differ on var/games/
filesystem: 755  package: 775

Well, yes, something like that...  Idk, it just happens sometimes with different packages.
So, no maintenance tips?

Offline

#5 2012-07-02 20:43:08

vwyodajl
Member
Registered: 2012-01-21
Posts: 183

Re: Issues with permissions

I have always understood that statement to mean that the directory is set to a specific permission, say 777 as you put. But the new/updated package being installed has a different file permission than what is currently configured on your system.

For example I have configured file permissions of 700 on /boot but anything that gets installed there says it differs from what is being installed which is 755.

Did you set your permissions yourself on that directory? Though I would not use 777 personally.

Last edited by vwyodajl (2012-07-02 20:43:58)

Offline

#6 2012-07-02 20:52:12

Terminator
Member
From: Belgium
Registered: 2012-05-07
Posts: 265

Re: Issues with permissions

You can find the exact warnings by checking pacman.log.

cat /var/log/pacman.log | grep warning

However, it's nothing to worry about.

Offline

#7 2012-07-02 21:29:40

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Issues with permissions

Terminator wrote:

You can find the exact warnings by checking pacman.log.

cat /var/log/pacman.log | grep warning

However, it's nothing to worry about.

You might want to save the cat + see what the permissions were:

$ grep -A1 "directory permissions" /var/log/pacman.log
[2012-06-04 23:13] warning: directory permissions differ on var/games/
filesystem: 755  package: 775
--
[2012-06-09 21:55] warning: directory permissions differ on var/games/
filesystem: 755  package: 775
--
[2012-06-20 00:02] warning: directory permissions differ on var/games/
filesystem: 755  package: 775
--
[2012-06-22 19:16] warning: directory permissions differ on var/games/
filesystem: 755  package: 775

I see that it's a recurring issue.

Offline

#8 2012-07-02 21:56:43

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: Issues with permissions

Thanks for the suggestions... i thought there were going to be some kind of script for fixing permissions,.... i see so in android, in mac, etc........ i don't know how do they fix or even know which specific permission every folder and file should have.....
Anyway, as they say: Don't try to fix what is not broken....

Offline

#9 2012-07-02 22:09:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: Issues with permissions

For those who are ever unsure if you need to use cat, I introduce my newest bash script called Schroedinger.  Allow your cat to exist in a superposition of states and only be used when needed

#!/bin/bash
# schroedinger

FNAME=$1
shift
$@ $FNAME || cat $FNAME | $@

Try

$schroedinger /var/log/pacman.log grep warning

... yes, this is a complete joke - though the script works fairly well and only calls cat when required.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB