View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 10 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Owner Issue
PostPosted: Mon Nov 01, 2010 6:39 pm 
Offline
Joined: Wed Apr 12, 2006 11:28 am
Posts: 82
Location: Beverly Hills, Michigan
Hi People,

(Ever make one of those really dumb mistakes), well I had a owner issue recently with a couple files (and changed the owner of the myth directory) back to myth. I am not sure what happen there. I ended up messing up the owner of my MythWeb. The commands I used to mess everything up was

chown mythtv:mythtv /myth/tv/*.mpg
chown mythtv:mythtv /myth/tv/*.mpg
chown mythtv:mythtv /myth

My question would be does anyone know what I have to do to correct the owner of mythweb.

It would be a great help if anyone could point me in the right direction.

Thanks again.

_________________
Backend/Frontend
ASUS M4A78-EM w/8400GS 4G RAM pcHDTV 3000 + PVR500 (1045), 1TB, 250 & 320. Iguana IR USB (running R6)
Frontend_1
Asus M2NPV-VM - 1GB RAM - 40 GB Hard Disk - StreamZap
Frontend_2
Dragon 1.0 w/ 2G RAM - 40 GB Hard Disk StreamZap


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 02, 2010 9:54 pm 
Offline
Joined: Thu Sep 27, 2007 5:44 pm
Posts: 580
Which version are you on? On R6.03 mythweb is in the following folder:
Code:
/data/srv/httpd/htdocs/mythweb
owned by httpd:users. I think that you will need to find the mythweb folder and make sure the owner is httpd.

I'm not sure how your chown commands would effect anything with mythweb. However, on my box, /myth is owned by mythtv:users and some of the files in /myth/tv are mythtv:mythtv and others are mythtv:users.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 03, 2010 11:00 am 
Offline
Joined: Wed Apr 12, 2006 11:28 am
Posts: 82
Location: Beverly Hills, Michigan
I am on version R6.03, I will check the owner tonight. Thanks for pointing me in the right direction there. I will post the fix (once I figure it out).

Thanks again for the help.

_________________
Backend/Frontend
ASUS M4A78-EM w/8400GS 4G RAM pcHDTV 3000 + PVR500 (1045), 1TB, 250 & 320. Iguana IR USB (running R6)
Frontend_1
Asus M2NPV-VM - 1GB RAM - 40 GB Hard Disk - StreamZap
Frontend_2
Dragon 1.0 w/ 2G RAM - 40 GB Hard Disk StreamZap


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 06, 2010 8:01 am 
Offline
Joined: Wed Apr 12, 2006 11:28 am
Posts: 82
Location: Beverly Hills, Michigan
Thanks, I seem to have fixed it with running

chown mythtv:users /myth
and then
chown mythtv:mythtv /myth/tv/*

Thanks again, my mythweb is working.

_________________
Backend/Frontend
ASUS M4A78-EM w/8400GS 4G RAM pcHDTV 3000 + PVR500 (1045), 1TB, 250 & 320. Iguana IR USB (running R6)
Frontend_1
Asus M2NPV-VM - 1GB RAM - 40 GB Hard Disk - StreamZap
Frontend_2
Dragon 1.0 w/ 2G RAM - 40 GB Hard Disk StreamZap


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 06, 2010 8:32 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
There are actually a relatively small set of files under /myth that have http as their group:
Code:
# find /myth -ls | grep http
25649153    4 drwxr-xr-x   2 mythtv   http         4096 Oct 24 16:13 /myth/ipodfeed
25649155    0 lrwxrwxrwx   1 mythtv   http           25 Oct 24 16:13 /myth/ipodfeed/index.php -> /myth/ipodfeed/m2iweb.php
25649154    8 -rwxr-xr-x   1 mythtv   http         6350 May 24 20:29 /myth/ipodfeed/m2iweb.php
18161669    4 drwxr-xr-x   2 mythtv   http         4096 Jun 10  2007 /myth/video/archive
18161670    0 -rwxrwxrwx   1 mythtv   http            0 Dec 25  2009 /myth/video/archive/.media
18161673    0 lrwxrwxrwx   1 mythtv   http           31 Oct 24 16:13 /myth/video/archive/index.php -> /myth/video/archive/archive.php
18161671    8 -rwxr-xr-x   1 mythtv   http         6413 Jan 18  2010 /myth/video/archive/archive.php

OBTW - /myth/backup and everything under it should be owned by root
Code:
chown -R root:root /myth/backup
chmod go-rwx /myth/backup/*


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 07, 2010 10:34 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
I wish the backup files were owned by mythtv it would make backing up on anohter computer easier.

_________________
My System


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 08, 2010 9:39 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Well it's your machine, and you're certainly free to chmod files, but the ownership and permissions were set up that way to keep unprivileged users from accessing privileged information.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 08, 2010 10:06 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
Sorry I should have been more specific the backup routine runs as root (or SUDO I can't remember which) that inherently makes the files owned by root. I just don't have enough knowledge to know why it's running as root are there root owned files that need to be changed. The easier solution in my case might be to examine the script that runs the backup and make the last line change the files to MythTV owned.

_________________
My System


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 09, 2010 8:34 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
It runs as root because a less privileged user doesn't have permissions to read all the file needed for the backup. It keeps the resulting files owned by root for the same reason.

To make a long story short, the backup files are owned and only readable by root for the same reason that computer systems have passwords and privilege levels and permissions in the first place. If the backups aren't protected they provide a backdoor to the information that you generally don't want other people having or fiddling with.

This extends far beyond the obvious. Limiting permissions also keeps you from accidentally shooting yourself in the foot. I've had testing versions of MythTV choke, puke and start deleting files when the backup drive was on-line. Because it was running as mythtv and not root the backups were protected and I was able to recover.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 10, 2010 11:26 pm 
Offline
Joined: Sun Sep 04, 2005 7:48 pm
Posts: 264
Location: Perth, Australia
I updated the /usr/LH/bin/mythbackup script to change the permissions of the backed-up files.

Once a week I scp from work to home, and backup my files, and my remote access is tied down by a private/publickey/passphrashe, so i dont feel exposed having my backup files readable by the mythtv user.

The change I made is below
Code:
# If you can't read this you've got no business restoring from it anyway.
$CHOWN root:root $BACKUP_TAR* $BACKUP_SQL*
$CHMOD go-rwx $BACKUP_TAR* $BACKUP_SQL*
#ADDED THIS BIT
$CHMOD o+r $BACKUP_TAR* $BACKUP_SQL*


It might help you out?

Nathan

_________________
LinHES: R6 | MB: Asus M3N-H/HDMI | CPU: AMD ??Mhz
Capture: 2xHDHR DVB-T
Graphics: Onboard 8300|PSU: Corsair vx450w
Cooling: Zalman cu?,
Display: Benq xx projector


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu