Broke Plugins: accidentally did a recursive permissions change on my root dataset

Status
Not open for further replies.

Bageland2000

Dabbler
Joined
Aug 24, 2014
Messages
48
Hello,
I've been having an issue where the permissions were constantly changing on some of my datasets without my action. For instance, I have plugins that have built-in scripts to rename and move files. I would get errors that resetting the permissions within the specific folder would fix. Today, I accidentally recursively set permissions to 777 from with the FreeNAS WebUI. This broke all my plugins. Is there any way to fix them without reinstalling/re-configuring all of them?

I'm a very inexperienced home user, so I will try to research and understand anything advice that is given. I typically administer the system through the UI and using CLI thru PuTTY using guides. I appreciate all the help the great people here are willing to offer. Thanks!
 

Allan Wilmath

Explorer
Joined
Nov 26, 2015
Messages
99
You should just be able to reset the permissions to whatever you want, just google what the permissions should be. I can't tell you because I'm using the now despised Corral and running everything in Docker containers, awesome btw.

There are two aspects to permission, one is the form of 777 that you mentioned. That should give you full functionality, just not security. IE, things should be working great. The exception to this would be if you managed to change ownership? That command is chown username:groupname filename Or chown -r username:groupname nameoffolder Forget if it's r or R.

If you were messing with the files as root user, and the user on a jail was something else like plex, then maybe that is the problem.
 

Bageland2000

Dabbler
Joined
Aug 24, 2014
Messages
48
I know this is the #1 rule not to do, but I always log into the WebUI as root, I don't know how else to do it.

I just went to volumes, then selected all 9 check boxes on the root volume and check the "set recursively" option. Any idea how that would have messed things up? I thought that was equivilient to "777" permissions, so that shouldn't have prevented plugins from initializing right?

...still trying to do research and figure this out myself.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I know this is the #1 rule not to do, but I always log into the WebUI as root, I don't know how else to do it.

I just went to volumes, then selected all 9 check boxes on the root volume and check the "set recursively" option. Any idea how that would have messed things up? I thought that was equivilient to "777" permissions, so that shouldn't have prevented plugins from initializing right?

...still trying to do research and figure this out myself.
many service will not work in those jails you affected. i believe a part of the freebsd operating system that runs startup services, as other users, notices it's permissions arent correct and refuses to run.

if you have any snapshots or backups you can revert those.
otherwise, if you inviested time configuring any of your plugins, they usually store their config/databases in a single data-directory, i usually try to put these under /var/db. what i would do is...
backup the data-directories for any plugins you dont want to resetup.
delete all your plugins
install new instances of your plugins
restore their data-directories

you will want to match the owner and permissions these plugins use. an quick way to do that is to start and stop the new instaces of the plugins to see what owner and permission the folder is that you are going to replace.

take regular snapshots, and never change the owner or permissions of you jails datasets. these are operating system files, and are delicate to changes unlike your own data files.
 

Bageland2000

Dabbler
Joined
Aug 24, 2014
Messages
48
I've been pouring through the documentation and came across this passage here: http://doc.freenas.org/9.3/freenas_system.html

" Note that while FreeNAS® automatically backs up the configuration database to the system dataset every morning at 3:45, this backup will not occur if the system is shutdown at that time and the backup will not be available if the system dataset is stored on the boot pool and the boot pool becomes unavailable. You can determine and change the location of the system dataset using System ‣ System Dataset."

Any idea how to access and restore the auto-backup of the config file? I can't figure it out.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
im not sure how restoring that helps you. your dataset would need to be reverted which the config wont do for you.
 

Bageland2000

Dabbler
Joined
Aug 24, 2014
Messages
48
Hey guys,
I've read through 90% of the FreeNAS documentation from top to bottom and have a much deeper understanding of how the system works fundamentally. I completely redid the permission on my shares and I think I understand how I broke my plugins.

I need to know how to backup and restore my plugin's config files (presumably through the command line.) I'm not savvy enough to know this yet. Can someone point me to a guide? Thanks.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Status
Not open for further replies.
Top