Project

General

Profile

Recording file permissions

Added by Sebastian Koschmieder over 9 years ago

Hi,

I have a little problem with the file permissions and my recordings. The configuration is set to use directory permissions 0775 and file permissions 0664. But this has no effect. The permissions in the filesystems are 0755 for the directory and 0644 for the file. This is the default recording configuration:

{
        "enabled": true,
        "name": "",
        "profile": "fa4128407c9d2fa40310f04d5e26ae6e",
        "cache": 2,
        "retention-days": 31,
        "pre-extra-time": 5,
        "post-extra-time": 10,
        "episode-duplicate-detection": false,
        "epg-update-window": 86400,
        "storage": "/storage/recordings",
        "file-permissions": "0664",
        "charset": "UTF-8",
        "tag-files": true,
        "skip-commercials": false,
        "directory-permissions": "0775",
        "day-dir": false,
        "channel-dir": false,
        "title-dir": true,
        "channel-in-title": false,
        "date-in-title": true,
        "time-in-title": true,
        "episode-in-title": false,
        "episode-before-date": false,
        "subtitle-in-title": false,
        "omit-title": false,
        "clean-title": true,
        "whitespace-in-title": false,
        "windows-compatible-filenames": true
}

This is a test recording:

# ls -l /storage/recordings/
total 16
drwxr-xr-x    2 root     users         4096 Mar 11 12:06 Desperate Housewives

# ls -l /storage/recordings/Desperate\ Housewives/
total 21084
-rw-r--r--    1 root     users     14758000 Mar 11 12:07 Desperate Housewives.2015-03-11.11-43-1.ts
-rw-r--r--    1 root     users      6824400 Mar 11 12:05 Desperate Housewives.2015-03-11.11-43.ts

I need a little help.
Thanks.


Replies (2)

RE: Recording file permissions - Added by Prof Yaffle over 9 years ago

It's partly because you're running as root, I suspect. Default umask for root is normally 022 to suppress unintentional write permission for Group and Other - hence 0775 becomes 0755 (as should 0777 if you want to test), and 0664 becomes 0644 (as would 0666 for the same reasons). That's my guess, anyway.

Either don't run as root (best), change root's default umask (dangerous), or run a script to change the permissions afterwards (kinda clumsy but doable).

RE: Recording file permissions - Added by Sebastian Koschmieder over 9 years ago

I run it as root, because openelec runs tvheadend as root. Hm, I think, I will have a look at a script. Thanks.

    (1-2/2)