Synology Permission Error - Failure to Create Directory

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
adizukerman
Posts: 2
Joined: Mon Sep 10, 2018 1:29 am

Synology Permission Error - Failure to Create Directory

Post by adizukerman » Mon Sep 10, 2018 1:39 am

Hello,

I was hoping someone could point me in the right direction to fix an issue I'm running into. Whenever I add a comic it fails to create the directory due to a permission error (per the log file). I've tried changing the account ownership of the Mylar_Scan folder (the directories are created underneath this) to multiple groups and users but no change. You can see the details in the log file. I run into this issue when I search for a comic and click "+ Add this comic." I am returned to the ComicDetails page but it never finishes loading the comic details. I've tried with both Enforce Permissions on and off in the settings. Here are the last settings I've tried:

Enforce Permissions (checked)
Directory CHMOD 0777
File CHMOD 0660
Owner None
Group sc-download

Mylar Version: master
-- git build 81252f3ebb42b1821c9ea66b8d258410a024fa8d.
Python Version : 2.7.14
Language : en_US.UTF-8

Synology Model: DS415+
Synology OS: DSM 6.2-23739

2018-09-10 09:27:02 WARNING Error trying to validate/create directory. Aborting this process at this time.
2018-09-10 09:27:02 WARNING [DIRECTORY-CHECK] Could not create directory: /Volume1/downloads/Mylar_Scan/Dark Knight III The Master Race (2015)[[Errno 13] Permission denied: '/Volume1']. Aborting.
2018-09-10 09:27:02 INFO [DIRECTORY-CHECK] Creating comic directory (0777) : /Volume1/downloads/Mylar_Scan/Dark Knight III The Master Race (2015)
2018-09-10 09:27:02 WARNING [DIRECTORY-CHECK] Could not find comic directory: /Volume1/downloads/Mylar_Scan/Dark Knight III The Master Race (2015)
2018-09-10 09:27:02 INFO Previous version detected as None - seeing if update required
2018-09-10 09:27:02 INFO Sucessfully retrieved details for Dark Knight III: The Master Race
2018-09-10 09:27:02 INFO Now adding/updating: Dark Knight III: The Master Race
2018-09-10 09:25:50 INFO Background Schedulers successfully started...

Thank you for any help!

All the best,

- Adi

User avatar
evilhero
Site Admin
Posts: 2263
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Synology Permission Error - Failure to Create Directory

Post by evilhero » Mon Sep 10, 2018 3:45 pm

It would seem the user running Mylar doesn't have proper permissions to even access the Volume1 mount itself. Is this a synopackage installation or a git install (I see the git commit, but I'm pretty sure even a synopackage install will have the same information instead of differentiating it).

Also, just as an FYI, Mylar can't enforce permissions if the user doesn't have the right permissions in order to perform the underlying command. Usually with Mylar running against a NAS, you don't need to have enforce permissions enabled within Mylar as these are all inherited by your NAS system (and usually enforced so having Mylar attempt to change them might cause some issues/problems)

adizukerman
Posts: 2
Joined: Mon Sep 10, 2018 1:29 am

Re: Synology Permission Error - Failure to Create Directory

Post by adizukerman » Mon Sep 10, 2018 8:24 pm

Hi Evilhero,

First, thank you for taking the time to help out, I really appreciate it.

1) This is a synopackage installation. I installed it as admin and I assume it is running as admin. Is there a way to verify this?
2) I logged into DSM as admin and validated that I could, via File Station, access the volume and create a directory in the folder from the original post. It worked.

I'll re-disable enforce permissions. That didn't work before, is there something else that you can think of that I should try or additional information I can provide?

Thanks,

- Adi

User avatar
evilhero
Site Admin
Posts: 2263
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Synology Permission Error - Failure to Create Directory

Post by evilhero » Tue Sep 11, 2018 2:34 pm

It could be that Mylar is running as a non-admin user (which when you think about it, makes perfect sense since you normally don't want to run everything as admin for security reasons). Provided you can get to a command line, you can enter:

Code: Select all

ps aux | egrep 'mylar'
You'll get a blurb back about "grep -E" probably which is just the command you issued, but also a line indicating the mylar that's running - the very far left portion should indicate the user it's running as. Whatever user that is, is where your permissions have to be adjusted most likely.

FWIW, there has been numerous problems in the past related to the SynoPkg installations mainly due to permissions issue and I think how either the SynoPkg install or the OS itself enforces the permissions. All of these types of permissions issues have been solved by installing the git version of Mylar (via the git command) instead of the SynoPkg install. That being said there are those that run the SynoPkg install just fine, abeit I rarely hear about the ones that use it without issue, as I tend to only be aware of SynoPkg installation issues due to it being a problem...

Post Reply