Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm running Wowza Media Server on my server as "root". The problem is that all files created (recorded) by Wowza are "root:root" and aren't writable, editable, or deletable by any other users. How can I make it so that Wowza records files that are writable by other users?

I'd assume I'd use a group to facilitate this, but I'm not sure as to the recommended way to do this. Should I create a specific user to run Wowza as? How can I make this happen?

share|improve this question
add comment

4 Answers 4

up vote 4 down vote accepted

Wowza should really be run as a different user. I suggest creating a dedicated user and group for Wowza. Any files created by Wowza will be owned by it's user and it's primary group. To create the user:

groupadd wowza   # Create a group for Wowza
useradd -c 'Wowza Media Server' -d /path/to/media -g wowza wowza

The above command will create a group called wowza and a user called wowza. If needed you can invoke su as a wrapper around it to run it as a different user:

su -l -c 'umask 002; wowza-media-server' wowza

The above command when run from root will invoke the command wowza-media-server as user wowza. The command wowza-media-server will be running as user wowza and any files it creates will be owned by user wowza and group wowza. The umask 002 ensures that any files created by wowza-media-server will be group writable. Then you can add users to that group and they will be able write to any files created by wowza-media-server.

share|improve this answer
add comment

It's in page 69 of the User Guide. There's a warning in there about changing users and privileged ports (ports below 1024), too.

Linux
First, we are going to create a new user and group named wowza.
groupadd wowza
useradd -g wowza wowza
passwd wowza
Next, we are going to change ownership and permissions on Wowza Server installation files.
cd /usr/local
chown wowza:wowza WowzaMediaServer
chown –R wowza:wowza WowzaMediaServer-2.2.3
chmod –R 775 WowzaMediaServer-2.2.3
rm –f /var/run/WowzaMediaServer.pid
rm –f /var/run/WowzaMediaServer.lock
Finally, we are going to change the command that is used to start the server so that it is run as the new wowza user. Change directory to the /usr/local/WowzaMediaServer/bin directory.
Edit the standalone startup script startup.sh and prepend sudo –u wowza to the 24th line. It should now be:
sudo –u wowza $_EXECJAVA $JAVA_OPTS -Dcom.wowza.wms.AppHome=
"$WMSAPP_HOME" -Dcom.wowza.wms.ConfigHome=
"$WMSCONFIG_HOME" -cp
$WMSAPP_HOME/bin/wms-bootstrap.jar
com.wowza.wms.bootstrap.Bootstrap start
You will also need to edit the service startup script wms.sh and make the same change to line 24. Now both the standalone startup script and the service startup script will start the server as the
share|improve this answer
add comment

Assuming you're using apache, you could chown the files to apache:apache (or www-data:www-data, depending on your distro) and then chmod them to ug+wr and o-wrx.

share|improve this answer
add comment

You just can run Wowza as non root user - http://sysadmin.te.ua/linux/video-streaming/wowza-non-root.html

share|improve this answer
1  
In general, it is helpful to briefly summarize (or quote) the relevant content from any external resource in case the URL becomes unavailable at any time in the future. –  Barun Jan 31 at 13:10
    
The page you point to is not in English and, at least for me, is useless. –  Timo Jan 31 at 13:30
    
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. –  Timo Jan 31 at 13:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.