[wellylug] repository timed out issues

Jethro Carr jethro.carr at jethrocarr.com
Sat Jun 24 12:48:04 NZST 2006


Right ideas Sebastian, but lots of them doesn't apply to ubuntu. :-)


On Sat, 2006-06-24 at 12:01 +1200, Sebastian wrote:
> there are numerous ways, depending on your setup:
> - in the menu of your desktop, there might be an item called 'root
>   shell' which asks for root's password and gives you a shell then. in
>   the shell, you can 'mkdir /usr/share/yourdir'.

this will work.


> - in a shell, type 'su -' and then type the root password. this will
>   give you a root shell.

doesn't work - with ubuntu, you do not normally know the root password,
unless you change it yourself manually.

> - switch to the text console, usually ctrl+alt+f1 and log in as root.
>   usually, you get back to X11 (and your desktop environment) with
>   ctrl+alt+f7.

again, you can't do this, as you can't login as root.

Switching to the text console, is no different to opening up a new
console window, by-the-way Steve. However, you will sometimes use the
text console if:
a) you love it's look
b) you need to fix the gui.
c) you are using a gui-less box.


> - there might be 'sudo' in effect: 'sudo bash', followed by the input of
>   your user's password gives you a root shell. or just 'sudo mkdir
>   /usr/share/yourdir' (followed by user's password) to create the
>   directory.

this is what applies to ubuntu.



> also, you might want to change the access rights of the newly created
> directory with something like 'chmod 777 /usr/share/yourdir' or change
> its owner/group to your user, e.g. 'chown user /usr/share/yourdir'.

whilst this can be done, it's usually a bad idea, as any other user
could then change the files.

If you just want to install it, and be able to run it as a normal user,
use:
----
chmod 755 /usr/share/yourdir
----

This makes it so only root can write, but any user can read.


here's the real quick rundown of THE BASICS of chmod, as it can be a bit
confusing sometimes for newbies:

As you know, Linux has very good user security, and permissions.

You can view this by running:
---
ls -l
---

and will get output like (I've added some spaces):
-----
d rwx r-x ---  5 jethro jethrogroup 4096 Jun 21 22:42 computers
----

This shows the security of the file/directory. The first character, "d"
show that it in this case, it is a directory.

The next 3 characters "rwx", are the permissions for the user - in this
"jethro". This says "Jethro can read, write or execute (run) this file".

So a text file would need "r--" to be read, "rw-" to be written. But it
wouldn't need "--x", as it's not a program. A script/program would have
something like "rwx".

The 2nd set of 3 are the permissions for the group. So if user "bob" is
in the group "jethrogroup", and tries to access this file:

The first set of permissions don't apply, as these are for the "jethro"
user. However, since bob is in jethrogroup, the 2nd set applies. In this
case he can read or write.

Now user jane tries to access the file. Since she is not the user or the
group who owns the file, she gets the 3rd set of permissions. In this
case none, so she will not even be able to see that the file exists.


You can set it as follows:
chmod u=rwx file	= sets the user permissions
chmod g=rx file		= sets the group's permissions
chmod o=rx file		= sets the permissions for all other users.

You can use "a=" to set all permission groups at once.
chmod a= file		= set permissions to --- --- ---.
chmod a=rx file		= set all permission groups at once to r-x.


And you can change the ownership:
chown jethro file	= jethro now owns file
chgrp jethrogroup file	= group jethrogroup also owns the file.

But you can't have 2 users owning one file. You have to add them to a
group, and have that group owning the file.

You can also do it in "shorthand" using numbers:
chmod 777 file = chmod a=rwx file
chmod 755 file = chmod u=rwx file; chmod g=rx file; chmod o=rx file.


I have some detailed notes for a Linux course I did years ago, that I
could photocopy for you if you like. Contact me offlist Re: that.

cheers,

-- 
Jethro Carr

www.jethrocarr.com
www.jethrocarr.com/index.php?page=cv/cv.php
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.wellylug.org.nz/pipermail/wellylug/attachments/20060624/1763a7bd/attachment.pgp 


More information about the wellylug mailing list