Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-29-2004, 02:03 AM
|
#1
|
Member
Registered: Apr 2004
Location: Norway/Hamar
Distribution: Debian Sarge :)
Posts: 116
Rep:
|
make a folder readable
hi. How do i make a folder with other folders and files readable for all users ? Its so boring givin`read permission on every file and folder. Need a command so i give the entire folder with content read permissions
|
|
|
12-29-2004, 02:09 AM
|
#2
|
LQ Newbie
Registered: Dec 2004
Distribution: SuSE 9.1 Pro on Intel 2.4GHz (Dell Optiplex GX260)
Posts: 20
Rep:
|
Sorry if I misunderstand, but it sounds like you want to make a folder, and everything in it, including subfolders, etc., readable to all users. You can do that with the command
chmod -R a+r /folder/name/here
|
|
|
12-29-2004, 02:12 AM
|
#3
|
Member
Registered: Apr 2004
Location: Norway/Hamar
Distribution: Debian Sarge :)
Posts: 116
Original Poster
Rep:
|
yes, that is what i mean.
Thank You
|
|
|
12-29-2004, 02:15 AM
|
#4
|
Member
Registered: Apr 2004
Location: Norway/Hamar
Distribution: Debian Sarge :)
Posts: 116
Original Poster
Rep:
|
but i still get 403 Forbidden when trying to access one of the sub folders using my web browser. The files i want to make accessable is within my public_html folder. Any other sugestions ?
|
|
|
12-29-2004, 05:59 AM
|
#5
|
Member
Registered: Aug 2004
Location: Aachen, Germany
Distribution: Debian Sarge
Posts: 129
Rep:
|
evensen,
publishing files with apache means that - they have to be owned by the default apache user (on my boxes, www-data) - chown can do that
- easiest is to put the data into the apache publishing directory tree, on my boxes it starts with /var/www/
- you can also symlink (ln -s) the files into /var/www
Hope this helps,
Peter
|
|
|
12-29-2004, 06:18 AM
|
#6
|
Senior Member
Registered: Oct 2004
Posts: 1,272
Rep: 
|
Quote:
Originally posted by evensen
but i still get 403 Forbidden when trying to access one of the sub folders using my web browser. The files i want to make accessable is within my public_html folder. Any other sugestions ?
|
The parent folders to the data also need to be readable by apache, all folders need to have execute permissions for apache and all files need read permission, so for folders you would do a chmod 755 /folder and all files you would do a chmod 644 /folder/file
|
|
|
12-29-2004, 06:37 AM
|
#7
|
Member
Registered: Aug 2004
Location: New Zealand
Distribution: Slackware
Posts: 40
Rep:
|
As phil.d.g pointed out, the directories (folders) need execute permission too: In the top directory
find . -type d | while read f; do chmod 755 $f; done
(I don't know how to use '-exec' with 'find'.) Check other directories too just for fun. You will find that any directory that has no execute premission can't be read.
|
|
|
All times are GMT -5. The time now is 07:32 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|