How to Fix File and Directory Permissions
IT Connect > Web > Streaming > Fix Permissions
- On This Page
- Overview
- Setting Permissions
- Using the www-fixdir Command
Occasionally you have to adjust Unix file or directory permissions within your streaming media directory. UW Information Technology recommends specific settings and supplies a special command to help maintain permissions within your streaming media directory.
Overview
When you first activate streaming media services, your streaming media directory is assigned special permissions so that files and subdirectories are only accessible to you and the streaming media servers. A long listing of your streaming media directory reveals these permissions. For example:
ovid11% cd public_media
ovid11% ls -dl .
drwxr-s--- 2 webdemo www 512 Jan 01 11:55 webdemo
These permissions indicate that the directory is owned by the 'webdemo' account with group ownership of www. The group ownership is important because it determines whether the streaming media server has permission to serve files. The set group ID (setgid) bit is set to propagate group ownership of www throughout your streaming media directory.
Note: If your streaming media directory or anything in it has group ownership of user instead of www, use the www-fixdir command to fix the permissions.
Setting Permissions
In theory, as long as your streaming media directory has the right permissions, other files and subdirectories do too. In practice, however, permissions sometimes need adjustment via the chmod command.
-
To assign the right permission back to your streaming media directory use chmod 750 public_media and then run the www-fixdir command.
-
Unless noted elsewhere, files need only be readable. Use:
chmod 644 filename
To learn more about the chmod command, refer to How to Set File Permissions Using chmod.
Using the www-fixdir Command
UW Information Technology offers a special command called www-fixdir to help you maintain the special permissions assigned to your streaming media directory and its contents. To use this command:
-
Log in to your Homer account.
-
Press the O key for Other, then the W key to drop into the Web development environment.
-
At the prompt, enter the following command to change directories to your streaming media directory:
cd public_media
-
Now you can use the www-fixdir command. For example, to fix the permissions of your streaming media directory and all its contents enter:
www-fixdir -r .
Or, to fix the permission of a single subdirectory (e.g. videos) enter:
www-fixdir videos
Or, to fix the permission of a single file (e.g. yourfile.asf) enter:
www-fixdir yourfile.asf
Note: the www-fixdir command should be used after making changes with the chmod command.


