Permissions

Status
Not open for further replies.

Murdoc

In Runtime
Messages
109
Hi,
I'm logged onto my own seperate account (not root) and I've tried downloading to my public_html folder. However, when I try to save it said "access denied" and that I don't have permission. So then, I saved my files to desktop and tried to move the files tothe public_html directory. Still, it said access denied and that I do not have permission to do that. Why is that? How can I get the permission?
 
in unix or linux there are permissions for user and group and root for every file and device(devices in linux are treated as files), and there's also read,write, and execute permissions for every file

the "chmod" command changes permissions--------type man chmod in a terminal and a "man" page will pop up, all commands have a man page which explain the syntax and options for a command

if you want to change the permissions for a file you dont have permission to change or access as a user it must be changed while logged in as root

http://www.tldp.org

go there and start reading, they have "how-to" guides for almost anything, linux is complicated but very very powerful compared to windows

if your wondering why all these permissions exist, its a security feature, linux is a multiuser OS, you dont want regular users to be able to make system changes or access stuff they shouldnt have access to-----never know, you might have hundreds of users logged in at once, silly mistakes by regular users wont crash the system or change it in any way because of these features
 
ok, I've checked permissions for the folder... I've manaed to move files into the folder and now everything is ok (permission level 774) ... until I needed to load it on my web browser

here's my directory

home/murdoc/public_html/mdlabs/draw_triangle/hypotenuse.html

when I try to open up the html file, I typed localhost/~murdoc/mdlabs/draw_triangle/hypotense... it couldn't open...

accessing from shell with command cd public_html/mdlabs/draw_triangle, will result in error: Permission denied.

So I tried something simple and created a index.html file inside just public_html and again tried to open it with "localhost/~murdoc/" again it failed. However, I was able to open it with broser under "file" protocal... so what do I do now? how can I view the files? ><
 
ok, I've checked permissions for the folder... I've manaed to move files into the folder and now everything is ok (permission level 774) ... until I needed to load it on my web browser

here's my directory

home/murdoc/public_html/mdlabs/draw_triangle/hypotenuse.html

when I try to open up the html file, I typed localhost/~murdoc/mdlabs/draw_triangle/hypotense.html, it couldn't open...

accessing from shell with command cd public_html/mdlabs/draw_triangle, will result in error: Permission denied.

So I tried something simple and created a index.html file inside just public_html and again tried to open it with "localhost/~murdoc/" again it failed. However, I was able to open it with broser under "file" protocal... so what do I do now? how can I view the files? ><
 
geez, ok just typing the filename from a command prompt wont do squat-------it may try to execute the filename as though its a program, but it isnt gonna open it

in order to open a text file you use an editor, try pico or vi or whatever editors you have installed, have no clue whats on your machine, pico is part of the pine package, you will find vi very very confusing at first but its the standard text editor installed on most systems, pico is much easier to use

this isnt a permissions issue, this is lack of understanding of what the hell your doing

assuming your running a GUI there are numerous text editors available that are much easier to use, try one of those

who owns public_html/mdlabs/draw_triangle ? all of it, each directory? If all this is in your home directory which it appears to be, and they were created by the same user and NOT root, none of this should be happening-------- using ls -l from in a directory will list all the files with size and permissions ----you will see a bunch of rwxrwxrwx type stuff on the left, r=read w=write x=execute, one column for root, one for user, and one for owner I believe

little tip, suppose you want to open hypotenuse.html and edit it, if you have pico available and installed, type pico mdlabs/dra(tab key)/hyp(tab key) -------tab key will autocomplete file names or directories or commands for you or show whatever options or commands are available when you hit the tab key a couple times

do some reading up on BASH and commandline skills, although similar to DOS, its much more powerful with alot more options
 
Status
Not open for further replies.
Back
Top Bottom