LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-07-2007, 02:26 PM   #1
Mysticle31
Member
 
Registered: Nov 2007
Location: California
Distribution: Xubuntu 7.10 Gutsy
Posts: 77

Rep: Reputation: 15
Trying to configure MythTV, serial to set top box, channel.bin permission denied...


I've been trying to configure MythTV. I'm excited in that this is the closest I have gotten to a working Linux install! It's been a nice crash course.


I'm running Kubuntu
I started having this problem after following the directions here:

https://help.ubuntu.com/community/My...hannel_Changer



steve@Desktop -$ channel 54
bash: /usr/local/bin/channel: Permission denied
steve@Desktop:~$ sudo channel 54
[sudo] password for steve:
sudo: channel: command not found
steve@Desktop:~$ cd /usr/local/bin
steve@Desktop:/usr/local/bin$ channel 54
bash: /usr/local/bin/channel: Permission denied
steve@Desktop:/usr/local/bin$ sudo channel 54
sudo: channel: command not found

Then I did this
steve@Desktop:/usr/local/bin$ sudo chmod +x /usr/local/bin/channel
steve@Desktop:/usr/local/bin$ channel

Did nothing but a blinking cursor, so I abborted with Ctrl+C

steve@Desktop:/usr/local/bin$ setserial /dev/ttys0
/dev/ttys0: Input/output error
steve@Desktop:/usr/local/bin$ channel 54
channel: /dev/ttyS0: Resource temporarily unavailable


I think I would much rather have access denied and help fixing that than resource temporarily unavailable What did I do! Someone help dig me out of my little hole. How do I make this work?

On a side note, I tried to skip this step and just see if my capture card would just play whatever channel my cable box is set to, and it wouldn't. So I have more problems to investigate after this one :P.
__________________

Last edited by Mysticle31; 12-07-2007 at 03:11 PM.
 
Old 12-07-2007, 03:19 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Probably the reason why you can't run channel as a user is that you don't have permission to run the underlying hardware. The reason you probably can't run it with sudo is that it's probably not in your path. Try sudo echo $PATH. If it doesn't have /usr/local/bin listed, then as root (i.e. sudo) you can't just type "channel" because the shell is not looking in that directory. From the /usr/local/bin directory you can type sudo ./channel 54 (the "./" means in this directory) and it should work.

As to why you get "resource unavailable" I can't tell you. My Myth box just gets expanded basic from the wall, I haven't messed with controlling a set top box.
 
Old 12-09-2007, 12:57 PM   #3
Mysticle31
Member
 
Registered: Nov 2007
Location: California
Distribution: Xubuntu 7.10 Gutsy
Posts: 77

Original Poster
Rep: Reputation: 15
Well, I reformatted and got rid of all the modifications I made. However, it's still not working.

I tried sudo echo $path and running it as sudo ./channel 54. Just to prove that I was in the same directory I did ls.


steve@Desktop:/usr/local/bin$ channel 54
bash: /usr/local/bin/channel: Permission denied
steve@Desktop:/usr/local/bin$ sudo channel 54
sudo: channel: command not found
steve@Desktop:/usr/local/bin$ sudo echo $path

steve@Desktop:/usr/local/bin$ sudo ./channel 54
sudo: ./channel: command not found
steve@Desktop:/usr/local/bin$ dir
channel
steve@Desktop:/usr/local/bin$ ls
channel
steve@Desktop:/usr/local/bin$
 
Old 12-09-2007, 12:59 PM   #4
Mysticle31
Member
 
Registered: Nov 2007
Location: California
Distribution: Xubuntu 7.10 Gutsy
Posts: 77

Original Poster
Rep: Reputation: 15
Just for the fun of it I tried running channel without a channel number to see if I got different results.

Same thing.

steve@Desktop:/usr/local/bin$ channel
bash: /usr/local/bin/channel: Permission denied
steve@Desktop:/usr/local/bin$ ./channel
bash: ./channel: Permission denied
steve@Desktop:/usr/local/bin$ sudo ./channel
sudo: ./channel: command not found
steve@Desktop:/usr/local/bin$ sudo channel
sudo: channel: command not found
 
Old 12-10-2007, 11:28 AM   #5
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
What is the output of ls -l?
 
Old 12-13-2007, 12:37 AM   #6
Mysticle31
Member
 
Registered: Nov 2007
Location: California
Distribution: Xubuntu 7.10 Gutsy
Posts: 77

Original Poster
Rep: Reputation: 15
steve@Desktop:~$ ls -l
total 0
drwx------ 2 steve steve 43 2007-12-12 21:04 Desktop
lrwxrwxrwx 1 steve steve 26 2007-12-12 21:56 Documents -> /media/secondary/Documents
lrwxrwxrwx 1 steve steve 26 2007-12-12 00:48 Examples -> /usr/share/example-content
lrwxrwxrwx 1 steve steve 22 2007-12-12 21:56 Music -> /media/secondary/Music
lrwxrwxrwx 1 steve steve 25 2007-12-12 21:56 Pictures -> /media/secondary/Pictures
lrwxrwxrwx 1 steve steve 23 2007-12-12 21:56 Videos -> /media/secondary/Videos


I created soft links to my data drive mounted /media/secondary.
 
Old 12-13-2007, 11:15 AM   #7
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Sorry, I meant of the /usr/local/bin directory. You can do ls -l /usr/local/bin |grep channel.
 
Old 12-13-2007, 06:59 PM   #8
Mysticle31
Member
 
Registered: Nov 2007
Location: California
Distribution: Xubuntu 7.10 Gutsy
Posts: 77

Original Poster
Rep: Reputation: 15
I thought that was odd you would ask me for that. I was thinking "hmm, I wonder if he means in the usr folder" Then I thought "nah, better do as told" :P Sorry.

I've reformatted a couple of times and have the same problem. Although the location and name of the file have changed. It depends on which set of configuration instructions I was following at the time.


steve@Desktop:~$ ls -l /usr/bin |grep change-channel
-rw-r--r-- 1 root mythtv 2741 2007-12-12 20:52 change-channel.py
steve@Desktop:~$

Just so you know I'm not dreaming, here is a series of commands I did to try and change the channel.

steve@Desktop:~$ change-channel.py 34
bash: /usr/bin/change-channel.py: Permission denied
steve@Desktop:~$ sudo change-channel.py 34
sudo: change-channel.py: command not found
steve@Desktop:~$ sudo /usr/bin/change-channel.py 34
sudo: /usr/bin/change-channel.py: command not found
steve@Desktop:~$ cd /usr/bin
steve@Desktop:/usr/bin$ ls *.py
automatix.py change-channel.py
steve@Desktop:/usr/bin$ change-channel.py 45
bash: /usr/bin/change-channel.py: Permission denied
steve@Desktop:/usr/bin$ sudo change-channel.py 45
sudo: change-channel.py: command not found
steve@Desktop:/usr/bin$ sudo ./change-channel.py 45
sudo: ./change-channel.py: command not found
steve@Desktop:/usr/bin$


If I can't do it, how is MythTV supposed to do it :P (it doesn't, I tried)

I find it interesting I can't run this as sudo. I thought sudo could do everything.

Last edited by Mysticle31; 12-13-2007 at 07:00 PM.
 
Old 12-13-2007, 07:12 PM   #9
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Well, when I look at the output of the ls command, the execute bit isn't set. You might try sudo chmod a+x /usr/bin/change-channel and then run it again.

I haven't used python scripting (just bash scripting), but I assume the script's first line identifies itself as python so that the shell knows what to do with it.

Last edited by pljvaldez; 12-13-2007 at 07:15 PM.
 
Old 12-14-2007, 12:54 AM   #10
Mysticle31
Member
 
Registered: Nov 2007
Location: California
Distribution: Xubuntu 7.10 Gutsy
Posts: 77

Original Poster
Rep: Reputation: 15
Yes it does. The first line is
"#!/usr/bin/python"

Why is that important? Is that what happens when you make a script executable? I see poeple say "make the script executable" but I don't know how to do that. How do I do that?

And thank you, thank you! It worked.

What did sudo chmod a+X /usr/bin/change-channel do?

Now I just have to go see if MythTV can use it!
 
Old 12-14-2007, 11:52 AM   #11
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Sorry I didn't explain, the chmod a+x is how you make scripts/files executable. Well, actually, what it says is allow all (a) to have execute (+x) permission. Here's a couple of links on how to manage file permissions in linux.

http://en.wikipedia.org/wiki/Chmod
http://www.comptechdoc.org/os/linux/..._ugfilesp.html

If you go back up and look at your ls -l output, you can see the file permissions on the left "-rw-r--r--" which told me that the owner of the file had read-write permission, the file group had read-only permission, and everyone else had read-only permission. There was no execute bit set.

Last edited by pljvaldez; 12-14-2007 at 11:53 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
-bash: ./configure: /bin/sh: bad interpreter: Permission denied cwwilson721 Slackware 28 12-25-2010 04:11 AM
/bin/.: Permission denied aizkorri Programming 9 03-17-2010 01:33 PM
su: /bin/bash: Permission denied fedora4002 Linux - Security 5 01-29-2010 08:46 AM
su: /bin/bash: Permission denied dwarf007 Linux - General 10 01-20-2006 04:32 PM
/bin/sh Permission Denied vi0lat0r Linux - Newbie 1 08-26-2003 07:46 AM


All times are GMT -5. The time now is 04:08 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration