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 06-29-2008, 03:57 AM   #1
DaftDave
Member
 
Registered: Mar 2008
Posts: 34

Rep: Reputation: 15
Folder and file permissions


I like building my own webpages/sites. And using HTML, XHTML, plus CSS are not a problem. I am at the moment in the midst of creating a new football website for myself and friends to share and follow our favourite club. But the one thing that is slowly but surely driving me crazy is "PERMISSIONS" being denied access to a folder or file that i may have only just created. I want a main folder in which to house everything including webpages, a folder for the images and a folder for players profiles. Can anyone tell me how to set the permissions please. I am the only person to have access to this computer and i am running PCLinuxOS 2007. Thanks!
 
Old 06-29-2008, 05:26 AM   #2
Nimoy
Member
 
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336

Rep: Reputation: 30
A couple of nice tutorials on setting permissions here:

http://catcode.com/teachmod/

http://www.hostingmanual.net/other/permissions.shtml
 
Old 06-29-2008, 10:37 AM   #3
sogenant
LQ Newbie
 
Registered: Dec 2007
Posts: 14

Rep: Reputation: 0
One thing to keep in mind is that you create files, and even if they are readable by you, for a web page, the relevant question is "can they be
read by the web server". For simple static content, usually the files you create should be "644" and the directories should be "755". ("directory" is same as "folder").

I'm guessing you are creating files on a hosting service's web server where they told you to create files in a folder called "web" or "public_html", and new folders you create are giving you "Permission Denied" when you try to load them in a web browser? If that's not the scenario, ignore ALL the rest of this. But if that's correct, a quick way to deal with getting existing stuff readable, assuming you have shell
access, is:

#chmod -R o+rx ~/public_html

(or ~/web, whatever folder they told you to create files in. "~" is shorthand for "my home directory").

That will set all files and folders in public_html, recursively, to be readable and executable. It's brute force and overkill (files don't need to be executable). And you'll have to do it everytime you upload something new, so it's not a long term solution. If you're on a hosted site, and your putting up files by ftp, sftp or something similar, is get the "umask" right so that files created in the future get created readable in the first place. If Nimoy's links don't help, ask your site admin, and tell them what software you're using to upload files.
 
  


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
File/Folder Permissions DaftDave Linux - Newbie 5 05-24-2008 07:09 AM
File/folder permissions Yig Linux - Newbie 3 11-28-2005 03:44 PM
File and folder permissions steve007 Linux - Newbie 3 06-30-2005 03:48 AM
File and Folder permissions seelk SUSE / openSUSE 9 01-28-2005 06:50 PM
File / folder Permissions bkbroil Linux - Newbie 3 10-15-2003 10:37 AM

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

All times are GMT -5. The time now is 06:51 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