Quick Review: Boxee Box
December 27, 2011 – 12:22 am | 3 Comments

Some of the technical issues with Boxee Box could have been fixed if the dev team was paying more attention to addressing the bugs rather than adding “features” of dubious value. In the final analysis, for the price and ease of use, Boxee Box is the best in its class and price range. You just need to be mindful of its limitations and buy it in hope of future improvements to its usability.

Read the full story »
Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Commands & Shells, Files

Numeric File Permissions in Unix

Submitted by on June 27, 2009 – 7:50 pmNo Comment
Numeric File Permissions in Unix

Suppose you are working with a Web server and your task is to make sure that no files or directories have permissions “777″. It would be easy to just recursively change permissions for all files to something like 644, but this may cause unexpected problems. You only need to change those files and directories that have “777″ permission and leave everything else as it is. Here is a simple script that will do just that.

The script will search for files and directories that have “777″ permissions and change files to 644 and directories to 755.

#!/bin/bash
 
find . -type f -exec sh -c '
	if [ `stat -c "%a" "{}"` -eq 777 ]
	then
		chmod 644 "{}"
	fi
' \;
 
find . -type d -exec sh -c '
	if [ `stat -c "%a" "{}"` -eq 777 ]
	then
		chmod 755 "{}"
	fi
' \;

Popularity: 2% [?]

Related posts:

  1. Changing time
  2. Unix Commands Summary
  3. Dealing With Disk Hogs
  4. Unix Files Transferred To CD
  5. Convert MySQL table to CSV file

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.