file permissions of executable files

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
ckonn
Level 3
Level 3
Posts: 128
Joined: Wed Oct 01, 2014 7:03 pm

file permissions of executable files

Post by ckonn »

what are/should be the default/correct/common file permissions after fresh installation of linux-mint - single human user - for the following (executable) files:

/bin/fusermount
/bin/mount
/bin/ping
/bin/ping6
/bin/rdisc6
/bin/su
/bin/umount

all file-name-letters in white and on red background and with 'rws' as permissions for the owner of the file at this timepoint
and

/usr/bin/chfn
/usr/bin/chsh
/usr/bin/gpasswd
/usr/bin/lppasswd
/usr/bin/mtr
/usr/bin/ndisc6
/usr/bin/newgrp
/usr/bin/passwd
/usr/bin/pkexec
/usr/bin/rltraceroute6
/usr/bin/sudo
/usr/bin/traceroute6.iputils
/usr/bin/X

all file-name-letters in white and on red background and with 'rws' as permissions for the owner of the file at this timepoint.

i don't remember ever to change the file-permissions of all these files to 'rws'. may be these files have 'rws' permissions by default just after the new installation of the os?

i know that the 's'-bit in 'rws' allows program to be run by non-root user/s, so shouldn't it be better/more secure to reset these 'rws' to 'rwx' for the owner of the file?

thanks in advance!
mikeflan
Level 2
Level 2
Posts: 96
Joined: Sun Apr 26, 2020 9:28 am

Re: file permissions of executable files

Post by mikeflan »

Hmmm. The standard answer is to not change any permissions of files below your user name directory.

Here is how I think the permissions should be on a fresh install:

-rwsr-xr-x 1 root root 30800 Aug 11 2016 fusermount
-rwsr-xr-x 1 root root 43088 Sep 16 13:43 mount
-rwsr-xr-x 1 root root 64424 Jun 28 2019 ping
lrwxrwxrwx 1 root root 4 Jun 28 2019 ping6 -> ping
-rwsr-xr-x 1 root root 44664 Mar 22 2019 su
-rwsr-xr-x 1 root root 26696 Sep 16 13:43 umount

Regarding the "S" in "RWSR", I say we want all users to be able to umount without root access, whether they have ownership of the file or not??

As you can tell, I am no expert in this area. I just want to get other jump-started to correct me where I am wrong.
User avatar
Flemur
Level 18
Level 18
Posts: 8820
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: file permissions of executable files

Post by Flemur »

ckonn wrote:
Sat Oct 24, 2020 4:49 am
all file-name-letters in white and on red background and with 'rws' as permissions for the owner of the file at this timepoint
Those colors depend on a color scheme/theme, so they don't mean much.

Values for a stock install of Mint 20 Xfce:

Code: Select all

-rwsr-xr-x 1 root root 39144 Mar  7  2020 /mnt/MT20/bin/fusermount
-rwsr-xr-x 1 root root 55528 Jul 21 01:49 /mnt/MT20/bin/mount
-rwxr-xr-x 1 root root 72776 Jan 30  2020 /mnt/MT20/bin/ping
lrwxrwxrwx 1 root root 4 Jul 18 15:11 /mnt/MT20/bin/ping6 -> ping
-rwsr-xr-x 1 root root 67816 Jul 21 01:49 /mnt/MT20/bin/su
-rwsr-xr-x 1 root root 39144 Jul 21 01:49 /mnt/MT20/bin/umount
-rwsr-xr-x 1 root root 85064 May 28 00:37 /mnt/MT20/usr/bin/chfn
-rwsr-xr-x 1 root root 53040 May 28 00:37 /mnt/MT20/usr/bin/chsh
-rwsr-xr-x 1 root root 88464 May 28 00:37 /mnt/MT20/usr/bin/gpasswd
-rwxr-xr-x 1 root root 82176 Aug 20  2019 /mnt/MT20/usr/bin/mtr
-rwsr-xr-x 1 root root 44784 May 28 00:37 /mnt/MT20/usr/bin/newgrp
-rwsr-xr-x 1 root root 68208 May 28 00:37 /mnt/MT20/usr/bin/passwd
-rwsr-xr-x 1 root root 31032 Aug 16  2019 /mnt/MT20/usr/bin/pkexec
-rwsr-xr-x 1 root root 166056 Jul 14 18:17 /mnt/MT20/usr/bin/sudo
-rwxr-xr-x 1 root root 26776 Jan 30  2020 /mnt/MT20/usr/bin/traceroute6.iputils
lrwxrwxrwx 1 root root 4 Sep  4 07:34 /mnt/MT20/usr/bin/X -> Xorg
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
ckonn
Level 3
Level 3
Posts: 128
Joined: Wed Oct 01, 2014 7:03 pm

Re: file permissions of executable files

Post by ckonn »

@Flemur thanks a lot!
Post Reply

Return to “Software & Applications”