nello
Patron
- Joined
- Dec 30, 2012
- Messages
- 351
I'm running MythTV with a post-processing ("User Job") script under the mythtv user to transcode and do other things to recordings. Once the processing is done, I want the script delete the original recording; here's an example of a recording file showing its permissions:
-rw-r--r-- 1 root mythtv 2560860424 Apr 29 07:30 1111_20150429120000.mpg
My script is unable to delete the original recording (using rm), apparently because the user mythtv doesn't have write permission.
Can someone tell me how to change the permissions with which recordings are written?
I presume that recordings are written by the user mythtv (though that doesn't explain why root is the owner).
Here's the mythtv home directory:
$ ls -al ~/
total 129
drwxrwxr-x 7 mythtv mythtv 17 Apr 28 20:42 .
drwxr-xr-x 8 root wheel 8 Apr 23 18:21 ..
-rwxrwxr-x 1 mythtv mythtv 102 Apr 23 18:22 .Xauthority
-rwxrwxr-x 1 mythtv mythtv 3200 Apr 23 18:22 .bash_history
-rw-r--r-- 1 mythtv mythtv 116 Apr 28 20:42 .bash_profile
-rwxr-xr-x 1 mythtv mythtv 270 Apr 23 21:00 .bashrc
drwxrwxr-x 2 mythtv mythtv 3 Apr 23 18:22 .config
-rwxrwxr-x 1 mythtv mythtv 965 Apr 23 18:22 .cshrc
drwxrwxr-x 2 mythtv mythtv 3 Apr 23 18:22 .dvdcss
-rwxrwxr-x 1 mythtv mythtv 35804 Apr 23 18:22 .history
-rwxrwxr-x 1 mythtv mythtv 148 Apr 23 18:22 .k5login
-rwxrwxr-x 1 mythtv mythtv 296 Apr 23 18:22 .login
-rwxrwxr-x 1 mythtv mythtv 1160 Apr 23 18:22 .mysql_history
drwxrwxr-x 11 mythtv mythtv 13 Apr 23 18:22 .mythtv
-rwxrwxr-x 1 mythtv mythtv 300 Apr 28 18:10 .profile
drwxrwxr-x 3 mythtv mythtv 6 Apr 23 18:22 .subversion
drwxrwxr-x 2 mythtv mythtv 2 Apr 23 18:22 .xmltv
I've tried entering umask 113 (to produce -rw-rw-r--) in the following files:
~/.profile
~/.bashrc
~/.bash_profile
But permissions on new files don't change; they are always -rw-r--r-- as you can see from this file I created from the mythtv user in nano:
-rw-r--r-- 1 mythtv mythtv 26 Apr 28 20:43 abc.txt
And yes, I logged out of mythtv and logged back in using this command from root:
su mythtv
How can I change the permissions with which recordings are written? If it involves umask, where to I enter it?
Thank you for your time and attention.
- nello
Update 2015.04.29
Yes, I posted this in the MythTV Forum:
https://forum.mythtv.org/viewtopic.php?f=36&t=822
-rw-r--r-- 1 root mythtv 2560860424 Apr 29 07:30 1111_20150429120000.mpg
My script is unable to delete the original recording (using rm), apparently because the user mythtv doesn't have write permission.
Can someone tell me how to change the permissions with which recordings are written?
I presume that recordings are written by the user mythtv (though that doesn't explain why root is the owner).
Here's the mythtv home directory:
$ ls -al ~/
total 129
drwxrwxr-x 7 mythtv mythtv 17 Apr 28 20:42 .
drwxr-xr-x 8 root wheel 8 Apr 23 18:21 ..
-rwxrwxr-x 1 mythtv mythtv 102 Apr 23 18:22 .Xauthority
-rwxrwxr-x 1 mythtv mythtv 3200 Apr 23 18:22 .bash_history
-rw-r--r-- 1 mythtv mythtv 116 Apr 28 20:42 .bash_profile
-rwxr-xr-x 1 mythtv mythtv 270 Apr 23 21:00 .bashrc
drwxrwxr-x 2 mythtv mythtv 3 Apr 23 18:22 .config
-rwxrwxr-x 1 mythtv mythtv 965 Apr 23 18:22 .cshrc
drwxrwxr-x 2 mythtv mythtv 3 Apr 23 18:22 .dvdcss
-rwxrwxr-x 1 mythtv mythtv 35804 Apr 23 18:22 .history
-rwxrwxr-x 1 mythtv mythtv 148 Apr 23 18:22 .k5login
-rwxrwxr-x 1 mythtv mythtv 296 Apr 23 18:22 .login
-rwxrwxr-x 1 mythtv mythtv 1160 Apr 23 18:22 .mysql_history
drwxrwxr-x 11 mythtv mythtv 13 Apr 23 18:22 .mythtv
-rwxrwxr-x 1 mythtv mythtv 300 Apr 28 18:10 .profile
drwxrwxr-x 3 mythtv mythtv 6 Apr 23 18:22 .subversion
drwxrwxr-x 2 mythtv mythtv 2 Apr 23 18:22 .xmltv
I've tried entering umask 113 (to produce -rw-rw-r--) in the following files:
~/.profile
~/.bashrc
~/.bash_profile
But permissions on new files don't change; they are always -rw-r--r-- as you can see from this file I created from the mythtv user in nano:
-rw-r--r-- 1 mythtv mythtv 26 Apr 28 20:43 abc.txt
And yes, I logged out of mythtv and logged back in using this command from root:
su mythtv
How can I change the permissions with which recordings are written? If it involves umask, where to I enter it?
Thank you for your time and attention.
- nello
Update 2015.04.29
Yes, I posted this in the MythTV Forum:
https://forum.mythtv.org/viewtopic.php?f=36&t=822
Last edited: