LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-08-2015, 07:10 AM   #16
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241

Quote:
Originally Posted by Shadow_7 View Post
Just guessing. You need to identify what user it is running as under cron (nobody?). And ensure that user has access (audio group?) and write permissions to the destination. Check the /etc/default/cron file for settings, and maybe change the logging level and check /var/log/ for why it's failing. Or if it's failing, I tend to stop cron entirely on my desktop installs. I'm not a big fan of logfile rotations in the middle of a boss fight. Or 6:25am noisy drive alarm clocks.
Cron runs as the users job. The problem is that cron does not have access to the audio, though putting the user in a group that has access to the audio might work - it also opens up the security issues... and could conflict with the GUI operation sometimes. Not too much of an issue of the system is single user...
 
Old 01-08-2015, 11:04 AM   #17
JeremyBoden
Member
 
Registered: Nov 2011
Posts: 939

Rep: Reputation: 174Reputation: 174
How about putting the command in a script - and giving the script SUID authority?
May be a bit dodgy from the security point of view...
 
Old 01-08-2015, 05:00 PM   #18
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
It shouldn't do anything. Setuid scripts have been disabled in the kernel - the executable pointed to by the script would have to be setuid.

Scripts are impossible to write securely. There are too many paths for untrusted data to enter and cause major security problems.

http://www.dwheeler.com/secure-class...id-setuid.html

And the "race condition" mentioned in that reference cannot be avoided. The problem is that "testing" the scripts permissions is done first, then the interpreter is started to run that script. Unfortunately for setuid scripts, the script itself can be replaced between the time the test is done, and the time the interpreter opens the script for interpretation. This doesn't happen for binary executables as the file is not closed between the test and loading of the file.

Last edited by jpollard; 01-08-2015 at 05:05 PM.
 
  


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
Perplexing sound problem, maybe flash related? Z038 Linux - General 2 11-11-2009 11:52 PM
Perplexing Joystick Problem jayfree Linux - Hardware 1 10-28-2009 02:31 AM
Perplexing problem mohitanchlia Linux - Software 1 08-04-2009 11:55 AM
Perplexing Problem eqisow Linux - General 7 08-17-2005 01:02 PM
Perplexing wireless routing problem Gerr Linux - Wireless Networking 8 03-30-2004 09:55 AM


All times are GMT -5. The time now is 11:55 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration