LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-26-2009, 03:04 AM   #1
xeonx
LQ Newbie
 
Registered: May 2009
Posts: 6

Rep: Reputation: 0
Smile non root related problem


Hi
i want to give read only permissions on my system to the non root users what can i do?
 
Old 05-26-2009, 09:51 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
The following commman does that:
chmod 774 filename
read chmod man page
man chmod
 
Old 05-26-2009, 10:23 AM   #3
david1941
Member
 
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS7
Posts: 267

Rep: Reputation: 58
This script does it for any directory (and all included in that directory). I call it allreadit
Must be executed by the owner of the directory or superuser

Code:
#! /bin/sh
# Makes directories browseable and files readable by all users
# Usage: allreadit Directory
#
BASE_DIR=$1
test ! -d $BASE_DIR && { echo "Base Birectory ($BASE_DIR) is not a directory" ; exit; }
find $BASE_DIR/ -type d |while read file; do chmod a+rx $file; done
find $BASE_DIR/ -type f |while read file; do chmod a+r $file; done
Dave

Last edited by david1941; 05-26-2009 at 10:36 AM. Reason: fix code tags
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
root account related querry hiteshthappa Linux - Newbie 1 09-06-2008 12:40 AM
unable to acsess localhost and other root related problems Omnutia Linux - Newbie 3 06-16-2006 04:00 PM
apache2 related problem tenzan Debian 3 07-10-2005 09:34 PM
XMMS related problem... lokee Linux - Software 4 09-01-2003 12:17 AM
Having a theme related problem BmxFace Linux - General 6 07-01-2003 01:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:12 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
Open Source Consulting | Domain Registration