On Sun, 08 May 2005 19:07, you wrote:
> I'm lost on learning this linux !!
>
> I'm trying to save a file (info.php) in :
> /var/www/html
>
> Each time I try to save it I get a pop-up saying that the file could not
> be saved, make sure I have write access and/or theres enough disk space.
>
> I have "NO" idea if I have write access although I cant see why not, all
> I can say is that I can save it to the desk top, and this linux is real
> frustrating.

/var/www/html is probably owned by root or a special user, or a special 
group.  Your problem is due to you (or rather the username you are using) 
not having sufficient permissions.  It is possible, but unlikely, to be 
disk space.

To check disk space type (in a terminal window)

df

this will give you a list of mounted partitions and how full they are.  
/var could be mounted on its own partition, or it might be under /
Either way, if any partitions show >90% usage then you should probably make 
sure you know what's using the space, and whether you have enough space 
left to do stuff (this is a system administration task, and guess who is 
the system administrator...).

to check permissions type (in a terminal window)

ls -al /var/www/html

and look for the line ending '..', which means the current directory.
It might look something like this

drwxr-xr-x   22 root     root         1024 Apr  7 21:06 ..

The first column tells you about permissions (in this case the first letter 
is 'd' to show it is a directory.  Files do not have a 'd' there).  Then 
columns three and four tell you the owner and group.

Now type

whoami

To tell you what username you are currently using.  Then type

groups

To tell you what groups you are in.

Now go to Google and search for "directory permissions linux" or something 
like that to find an explanation of what permissions mean and how they 
work.  You should be able to figure out why you cannot write to the 
directory.  Probably because you don't have write permission and neither do 
any of the groups you are in.

To solve this it is probably best to put yourself into a group that is 
permitted to write to the directory, or to log out and log in as a user 
that is permitted.  Remember, if you change your group membership you have 
to log out and log in again.

There is a good reason for all of this, and once you 'get it' you will 
realise why.  It will still be frustrating however...

Don't forget, apache runs under some username (it might be "apache" or it 
might be "nobody" or something else).  You (system administrator) need to 
make sure that "apache" (or whatever username) has read access to the files 
you expect it to show.  There can be some subtle interactions between 
permissions but it sounds like you are starting simple, so you discover 
them over time as you get more confident and start doing more.


> When I first installed mandrake 10.1 I set it up to automatically log me
> in, is there any way I can set this thing up so that I have access to
> everything ?

Log in as root.  Then you will have access to everything.  Be careful not 
to make any mistakes though...

Andy
-- 
Now playing: Moby - Natural Blues

Reply via email to