Jail Permission errors (read-only file system?)

Keyakinan

Dabbler
Joined
Jul 24, 2018
Messages
39
Hi,
So I can't access my jails from the shell anymore.

Can't change permission because its a read-only file system.

I'm not sure how to debug this or what is happening.

Also things like
$ sudo mount -o remount,rw /usr
Doesn't work because root hasn't got permission to execute these commands..

Help would be much appreciated!


1607115462324.png
 

Attachments

  • 1607115628532.png
    1607115628532.png
    3.7 KB · Views: 235

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
You shouldn't be changing permissions on your jails, you'll break them.
 

Keyakinan

Dabbler
Joined
Jul 24, 2018
Messages
39
Have you try using jexec?
you can look at 14.3. Creating and Controlling Jails in the 14.3.2. Configuring the Host.
There are some examples on how to access the jail. If something fails the error will be printed to the console.

Hopes this helps a bit.
First of all, thanks for your reaction!
I've read a bit about it but I see no resolution for my problem..
I'm still locked out of all my jails and nothings works anymore..
I really don't want to reset all my jails but maybe I have to..

Is there a folder that I can copy to safe all my config ect?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Please post the output of zfs get -r readonly <your pool name>/iocage.
 

Keyakinan

Dabbler
Joined
Jul 24, 2018
Messages
39
Please post the output of zfs get -r readonly <your pool name>/iocage.
root@truenas[/mnt/Pool-ada1/iocage]# zfs get -r readonly /mnt/Pool-ada1/iocage
NAME PROPERTY VALUE SOURCE
Pool-ada1/iocage readonly off default
Pool-ada1/iocage/download readonly off default
Pool-ada1/iocage/download/12.1-RELEASE readonly off default
Pool-ada1/iocage/images readonly off default
Pool-ada1/iocage/jails readonly off default
Pool-ada1/iocage/jails/jackettJail readonly off default
Pool-ada1/iocage/jails/jackettJail/root readonly off default
Pool-ada1/iocage/jails/plex readonly off default
Pool-ada1/iocage/jails/plex/root readonly off default
Pool-ada1/iocage/jails/plex/root/Movies readonly off default
Pool-ada1/iocage/jails/plex/root/Movies/qBittorrent readonly off default
Pool-ada1/iocage/jails/plex/root/Movies/sabNZBMovies readonly off default
Pool-ada1/iocage/jails/plex/root/Series readonly off default
Pool-ada1/iocage/jails/plex/root/Series/SABnzbd readonly off default
Pool-ada1/iocage/jails/qbittorrentJail readonly off default
Pool-ada1/iocage/jails/qbittorrentJail/root readonly off default
Pool-ada1/iocage/jails/radarrJail readonly off default
Pool-ada1/iocage/jails/radarrJail@ioc_update_12.1-RELEASE-p10_2020-11-15_22-50-23 readonly - -
Pool-ada1/iocage/jails/radarrJail@ioc_update_12.1-RELEASE-p10_2020-11-15_22-52-29 readonly - -
Pool-ada1/iocage/jails/radarrJail@ioc_update_12.1-RELEASE-p10_2020-11-29_15-33-26 readonly - -
Pool-ada1/iocage/jails/radarrJail@ioc_plugin_upgrade_2020-11-29 readonly - -
Pool-ada1/iocage/jails/radarrJail/root readonly off default
Pool-ada1/iocage/jails/radarrJail/root@ioc_update_12.1-RELEASE-p10_2020-11-15_22-50-23 readonly - -
Pool-ada1/iocage/jails/radarrJail/root@ioc_update_12.1-RELEASE-p10_2020-11-15_22-52-29 readonly - -
Pool-ada1/iocage/jails/radarrJail/root@ioc_update_12.1-RELEASE-p10_2020-11-29_15-33-26 readonly - -
Pool-ada1/iocage/jails/radarrJail/root@ioc_plugin_upgrade_2020-11-29 readonly - -
Pool-ada1/iocage/jails/sabnzbdJail readonly off default
Pool-ada1/iocage/jails/sabnzbdJail@ioc_update_12.1-RELEASE-p10_2020-12-09_23-19-21 readonly - -
Pool-ada1/iocage/jails/sabnzbdJail@ioc_plugin_update_2020-12-09 readonly - -
Pool-ada1/iocage/jails/sabnzbdJail/root readonly off default
Pool-ada1/iocage/jails/sabnzbdJail/root@ioc_update_12.1-RELEASE-p10_2020-12-09_23-19-21 readonly - -
Pool-ada1/iocage/jails/sabnzbdJail/root@ioc_plugin_update_2020-12-09 readonly - -
Pool-ada1/iocage/jails/sonarrJail readonly off default
Pool-ada1/iocage/jails/sonarrJail/root readonly off default
Pool-ada1/iocage/log readonly off default
Pool-ada1/iocage/log/Sonar Series readonly off default
Pool-ada1/iocage/releases
 

P4#0383

Dabbler
Joined
Dec 21, 2019
Messages
39
First of all, thanks for your reaction!
I've read a bit about it but I see no resolution for my problem..
I'm still locked out of all my jails and nothings works anymore..

I really don't want to reset all my jails but maybe I have to..

Is there a folder that I can copy to safe all my config ect?


It is always my pleasure!
What you can do is see if you can navigate to the directory.
Keep in mind I am thinking you have the pool mounted in /mnt dir.
For instance:
ls -ltr /mnt/Pool-ada1/iocage/jails/plex/ /
Since it is read only you should be able to read the files on the given location.
From there you ca:
cp /mnt/Pool-ada1/iocage/jails/plex/* /mnt/Pool-ada1/[New_Files_Location]
Keep in mind that in *nix everything is consider a file.
 

Keyakinan

Dabbler
Joined
Jul 24, 2018
Messages
39
It is always my pleasure!
What you can do is see if you can navigate to the directory.
Keep in mind I am thinking you have the pool mounted in /mnt dir.
For instance:
ls -ltr /mnt/Pool-ada1/iocage/jails/plex/ /
Since it is read only you should be able to read the files on the given location.
From there you ca:
cp /mnt/Pool-ada1/iocage/jails/plex/* /mnt/Pool-ada1/[New_Files_Location]
Keep in mind that in *nix everything is consider a file.

Woulnd't this also copy the read-only files or permission stuff? Then I prob would have the same error
 

P4#0383

Dabbler
Joined
Dec 21, 2019
Messages
39
Woulnd't this also copy the read-only files or permission stuff? Then I prob would have the same error

When copying files from one location to the next, the files usually inherit the permissions from the parent container.
Adding to this, the files will be outside the container and you can manipulate the ownerships and permissions with chown and chmod respectively.

Inside the jail is different since the jail root owns all the files, contrary to outside the jail, the root user of the destination folder will own the directory and the files in that directory.
chown -R root:root /mnt/Pool-ada1/iocage/jails/plex/
chmod -R 766 /mnt/Pool-ada1/iocage/jails/plex/

I would recommend to run the following making sure there are not flags sets on the files:
ls -lo /mnt/Pool-ada1/iocage/jails/

Perhaps these links might help on understanding a bit about configuring permissions.
[How-To] Giving Plugins Write Permissions to Your Data
3.4. Permissions - Chapter 3. FreeBSD Basics

Hopes that helps/
 
Top