Plugin losing permissions intermittently?

  • I've been on quite the learning curve the past couple of weeks getting my server up and running. Thank you all very much for the support. Now onto my next issue.


    Is there anything that would cause a plugin to lose its permissions without me making any changes?


    I've been having issues between couchpotato and a sync folder. Couchpotato seems to lose permissions after or during its processing.


    Examnple 1) I had 2 media files in a sync folder, Couchpotato processed, unrar'd, renamed, and relocated the first file to my media share, it then removed the file from my sync folder and sent me an email notifcation that everything was done. Works as expected. It proceeded with my second file but then it did not have permission to delete the file out of the sync folder and it did not send a notifcation. I'm not sure what would cause the permissions to change.


    I've had it happen a few times this week, on a couple occasions the rar files weren't fully unrar'd causing an incomplete media file in my media file and then some of the rar files had been deleted out of the sync folder. It was very strange. I had to re-copy the files on my remote server and re-sync with btsync, . Resetting the permissions worked but then it reverted back somehow.


    Another symptom, I use ES FIle Explorer on my Android phone to check the shared folders, when everything works well, my user has full access to read/write on any share. When these issues happen, I lose permission under my user to remove the files from my sync folder. Resetting the permissions didn't even allow me to remove the files from the sync folder. I had to login to my sync plugin on my remote server and delete the files off there, and they were then removed from my local sync folder via sync.


    I thought I had my shares setup fine, as the plugins all initially seem to work. Something happens at some point for things to change. My OMV sever is on UPS, so no power outages are causing any issues. I'm only really seeing issues with renamers/post-processing plugins and my sync folders.

    OMV 1.9 - Lenovo Thinkserver TS140 - Xeon E3-1200 v3 Series w/ 8GB Ram: 3 x 3TB WD RED - AUFS Pool, 1 x 16GB Samsung SSD System Drive
    Plex - Syncthing - Couchpotato - Sonarr - NUT

  • It all depends of the umask of the process that creates the file. Some have settings for that some others not


    The sync program, as in btsync?


    The problem happens in the unrar. Probably creating the files in 755 mode. Is that couch potato actually unraring or a downloader ?


    I tried btsync and had those problems, so I moved over to sync thing which is what's running now and have the same problems.


    I had to do a separate download of unrar using "apt-get install unrar". Couchpotato was giving me errors of "no suitable rar unpacker installed" when I first enabled it on my fresh system. I don't use any seperate downloaders on my system.

    OMV 1.9 - Lenovo Thinkserver TS140 - Xeon E3-1200 v3 Series w/ 8GB Ram: 3 x 3TB WD RED - AUFS Pool, 1 x 16GB Samsung SSD System Drive
    Plex - Syncthing - Couchpotato - Sonarr - NUT

    Einmal editiert, zuletzt von theory ()

  • Well syncthing will try to preserve the remote permission. So who's creating the remote permissions, deluge, nzbget?


    about couch potato I am not sure after unrar process. It might using the global umask. So you have to change that in the couch potato user profile.


    I have syncthing and rtorrent running on my whatbox seedbox. When the file is complete, rtorrent places a hardlink in the syncthing folder. From there it syncs to my omv server.


    What do you suggest the global umask be for couchpotato?

    OMV 1.9 - Lenovo Thinkserver TS140 - Xeon E3-1200 v3 Series w/ 8GB Ram: 3 x 3TB WD RED - AUFS Pool, 1 x 16GB Samsung SSD System Drive
    Plex - Syncthing - Couchpotato - Sonarr - NUT

    • Offizieller Beitrag

    I guess the hard link will preserve the original permission file. You will have to set the umask in rtorrent then.


    The global system umask is 022(755),


    You can try and set a couch potato umask in is home folder ~/.bashrc file but I am not sure if it will work. it will have to be 002.


    at the end what you try and have to do is preserve the group permission so the file can be edited by multiple programs.

  • Thanks, I will do some reasearch and see how I can go about doing that in rtorrent. I'll teport back if I need some more help or if I fix it.

    OMV 1.9 - Lenovo Thinkserver TS140 - Xeon E3-1200 v3 Series w/ 8GB Ram: 3 x 3TB WD RED - AUFS Pool, 1 x 16GB Samsung SSD System Drive
    Plex - Syncthing - Couchpotato - Sonarr - NUT

  • It is a prebuilt seedbox from whatbox.ca. I can ssh using putty/kitty and configure my slot though, that's how I downloaded syncthing and got it up and running. I'm just unfamiliar with how to modify rtorrent itself.


    I was hoping this was a smb issue or something but it makes sense that the issue is from where the initial file is created. I just couldn't understand why it works and then stops working.

    OMV 1.9 - Lenovo Thinkserver TS140 - Xeon E3-1200 v3 Series w/ 8GB Ram: 3 x 3TB WD RED - AUFS Pool, 1 x 16GB Samsung SSD System Drive
    Plex - Syncthing - Couchpotato - Sonarr - NUT

  • So I've done some testing. I was going to track all my changes to troubleshoot this and so far the only change I made was to check the box for ignore permissions inside the sync app itself. I had some single files download, sync, rename and move without any issue at all. I tried 1 single media file and it worked. I tried 2 files at same time and that was fine too, i even tried 5 files syncing and renaming and they worked flawless.


    Once I tried that I moved onto trying .rar files. I sync'd one .rar media file drom seedbox to OMV and couchpotato failed. I'm wondering if the issue lies within unrar program permissions?


    I should note i have unrar-nonfree installed v 1:5.2.5-1

    OMV 1.9 - Lenovo Thinkserver TS140 - Xeon E3-1200 v3 Series w/ 8GB Ram: 3 x 3TB WD RED - AUFS Pool, 1 x 16GB Samsung SSD System Drive
    Plex - Syncthing - Couchpotato - Sonarr - NUT

    Einmal editiert, zuletzt von theory ()

    • Offizieller Beitrag

    I'm wondering if the issue lies within unrar program permissions?


    Yes it could be, since mostly default umask is usually 755 system wide, couchpotato uses that probably and there is no way to change in couchpotato from what i read. I don't use couchpotato, but extraction i do it at the remote server then push through syncthing, mkv, mp4 whatever, not the rar package.


    Di you try changing the umask at couchpotato ~/bashrc file in is home folder?


    Maybe @jhmiller has an idea about couchpotato unraring file mode.

  • I changed the umask in the web interface to 755, but i did not do this in the ~/bashrc file. To be honest i dont know what that is... off to google i go!

    OMV 1.9 - Lenovo Thinkserver TS140 - Xeon E3-1200 v3 Series w/ 8GB Ram: 3 x 3TB WD RED - AUFS Pool, 1 x 16GB Samsung SSD System Drive
    Plex - Syncthing - Couchpotato - Sonarr - NUT

  • I have 0755 this means that it will only work with files owned by couchpotato or any other user that is part of the users group, if you rar file does not belong to one of these it will fail.

    [align=center]banner@1x.jpg
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • Is there a way to confirm what group syncthing belongs to?

    OMV 1.9 - Lenovo Thinkserver TS140 - Xeon E3-1200 v3 Series w/ 8GB Ram: 3 x 3TB WD RED - AUFS Pool, 1 x 16GB Samsung SSD System Drive
    Plex - Syncthing - Couchpotato - Sonarr - NUT

  • id syncthing


    I do not understand why there are not scripts available for people using the downloaders to move and change chown/chmod. It seems there should be a collection of these by now.

    • Offizieller Beitrag

    Is there a way to confirm what group syncthing belongs to?


    syncthing runs under a username, and that username is defined in the control panel of syncthing in the webUI of omv. So syncthing can launch multiple instances under several usernames. If is a normal user of omv, that user will belong to group users. Normal folders in omv should retain group ownership to users if the setgid is established which is the default.


    Most daemon users (couchpotato, sabnzbd, etc) belong to users

  • So in my case syncthing is run under my main user in the group users, couchpotato is also apart of users, I confirmed using id command from tekkb.


    I have changed chmod in cp to 0777.

    OMV 1.9 - Lenovo Thinkserver TS140 - Xeon E3-1200 v3 Series w/ 8GB Ram: 3 x 3TB WD RED - AUFS Pool, 1 x 16GB Samsung SSD System Drive
    Plex - Syncthing - Couchpotato - Sonarr - NUT

    • Offizieller Beitrag

    @jhmiller i've just noticed that the init script doesn't use standard start-stop-daemon, it uses sudo -u, if the init script can use the normal init start we can define a flexible umask, without changing the default system wide. I use umask in the init script for deluge for example since deluge doesn't have an option.


    @theory is it working now with 0777?

  • I will report back in the morning. Going to take some time to sync another .rar folder.

    OMV 1.9 - Lenovo Thinkserver TS140 - Xeon E3-1200 v3 Series w/ 8GB Ram: 3 x 3TB WD RED - AUFS Pool, 1 x 16GB Samsung SSD System Drive
    Plex - Syncthing - Couchpotato - Sonarr - NUT

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!