Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Wrong' permissions of / #1098

Closed
ThomasKaiser opened this issue Sep 5, 2018 · 8 comments
Closed

'Wrong' permissions of / #1098

ThomasKaiser opened this issue Sep 5, 2018 · 8 comments

Comments

@ThomasKaiser
Copy link
Contributor

(Recent?) Armbian images set permissions of the root directory to 777 while they should be 755. As a result some software checking recursively for permissions like sshd complain and refuse to work in specific modes.

Is this by intention?

@igorpecovnik
Copy link
Member

No, haven notice. Where is that set?

@ThomasKaiser
Copy link
Contributor Author

No idea where it originates from. But at least with latest images it's set that way. I realized it with Stretch and now double checked with Bionic:

root@nanopik1plus:~# ls -lad /
drwxrwxrwt 22 root root 4096 Aug 20 18:43 /
root@nanopik1plus:~# lsb_release -c
Codename:	bionic

Anyway, doing an chmod 755 $rootfs-root prior to closing the image should fix the issue.

@adatum
Copy link

adatum commented Aug 24, 2019

I ran into this issue on OMV_4_Odroid_XU4_HC1_HC2.img.xz release dated 2018-06-03 and downloaded on 2019-08-08 at https://sourceforge.net/projects/openmediavault/files/OMV%204.x%20for%20Single%20Board%20Computers/

ssh authentication failed (public key denied) when password authentication is disabled. It worked fine with password authentication enabled.

The Authentication System Log in openmediavault showed

sshd: Authentication refused: bad ownership or modes for directory /

chmod 755 / fixes the problem.

@sw25481
Copy link

sw25481 commented Sep 21, 2020

I ran into the same problem with openmediavault_5.3.9-amd64.iso downloaded 20 Sep 2020 installed into a VMware virtual machine. chmod 755 / fixed if for me as well

@Herjar
Copy link

Herjar commented Apr 15, 2021

I got the same issue with openmediavault_5.5.11-amd64.iso installed as vm in proxmox. sudo chmod 755 / fixed it here too.

@lededev
Copy link
Contributor

lededev commented Apr 21, 2021

armbian have make /root directory dr-xr-xr-x, and with wrong user id.
That cause ssh pub key login failed.
fix:
chmod 700 /root
chown root:root /root

@igorpecovnik
Copy link
Member

Stock Armbian doesn't seem to have this problem:
drwx------ 7 root root 4096 Apr 21 00:35 root

@lededev
Copy link
Contributor

lededev commented Apr 21, 2021

Well, if not stock, that may caused by some programs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants