Re: default file permissions

2004-05-11 Thread Bart Dorsey
On Monday 10 May 2004 11:17 am, Antonio Rodriguez wrote:
 Would some explain further the 4 number system? More exactly, the last
 three numbers are clear, they are explained everywhere, but the first
 one, refering to special, is not explained anywhere that I know. I
 will be happy to read about it. I imagine that the first digit has to
 do with the sticky bit, about which I wouldn't mind reading. It
 seems that in most references that I have seen they don't talk about
 it much.

Okay, here goes ;) you asked for it ;)

first off, binary 

imagine three three digit binary numbers in a row.

000 000 000 = rwx rwx rwx

Let these represent the bits you are toggling 

then assign these places just like you would for decimal numbers.

(in decimal you have 100's place, 10's place and 1's place... in binary 
however, you use powers of 2 not 10, so you get 4's place, 2's place and 1's 
place.)

Each of these places can be assigned either a 0 or a 1.

421 421 421  = rwx rwx rwx

so 

rw-rw-r-- would be 110 110 100 

or...  4 + 2,  and 4 + 2, and 4 

or...  644.

Since the maximum possible number is 7 and the minimum is 0, this means
we are creating three octal numbers (octal meaning 8)

other examples:

rwxrwxrwx = 111 111 111 = 777
r--r--r-- = 100 100 100 = 444
rwxrwxr-x = 111 111 101 = 775

You should get the idea.

BTW, the sticky bits are overlaid on top of these to create the extra 
digit...
 4 2 1
rwx rwx rwx 

so group sticky would be 2777 in this example... and it prints as

rwx rws rwx



 Thank you all.


pgpf3OvDGEcnN.pgp
Description: signature


Re: default file permissions

2004-05-11 Thread Bart Dorsey
On Tuesday 11 May 2004 9:11 am, Antonio Rodriguez wrote:

  BTW, the sticky bits are overlaid on top of these to create the extra
  digit...
   4 2 1
  rwx rwx rwx

 can you be more explicit?

Sure, I'll try the first rwx is the 4's place, the second rwx is the 2's 
place, and the third rwx is the 1's place... it's another 3 digit binary 
number overlaid on TOP of the exisiting permissions.

so, group sticky would be.

0 1 0

which gives us a 2.

user sticky would be a 1 0 0 or,  4, this is mostly used to make stuff run 
setuid by another user (usually root)

and other sticky (used by the /tmp directory..shows up as a t in the 
permissions list)  would be 0 0 1   or   1

rwsrwsrwt  would be what it would look like at 

I hope that makes more sense.


  so group sticky would be 2777 in this example... and it prints as
 
  rwx rws rwx

 Very unclear. Thank you for allowing me to (ab)use your good disposition.




Re: default file permissions

2004-05-09 Thread Bart Dorsey
The real proper way to do this is to create your family-group (in fact the 
users group would suffice for this, just add both users to is (why is this 
not the default in debian?)

them create /home/shared-stuff

and set it 775 

chmod 775 /home/shared-stuff

then set the group sticky bit on the directory

chmod g+s /home/shared-stuff

and chown it to root.users

chown root.users /home/shared-stuff

now, people in the users group can create files in there, the default umask
will make them 644, but you can easily change that so that the umask is 664 if 
you really want.

But, it's important to note, that you could leave umask alone, and when there 
are files you WANT to share, you put them at 664 manually... chmod g+w file

Anyway, however you do it, the sticky bit on the directory makes the files 
end up owned by the group users.  If you didn't have this files would be 
owned by your private group (the one named just like your username), and your 
wife wouldn't be able to access them.

Example:

users on my box:  echo and froddie.

ringo:/home# ls -adl shared-stuff
drwxrwsr-x2 root users4096 May  9 22:12 shared-stuff

See the sticky bit? (the s)

[EMAIL PROTECTED]:/home/shared-stuff$ ls -al
total 8
drwxrwsr-x2 root users4096 May  9 22:13 .
drwxrwsr-x   15 root staff4096 May  9 22:12 ..
-rw-rw-r--1 froddie  users   0 May  9 22:13 bar
-rw-r--r--1 echo users   0 May  9 22:13 foo

I just touched two files in this dir. My umask is 022 (the default). As echo, 
I created foo. My wife can read it, but she can't modify it.

I logged in as my wife... and touched bar.  I did chmod g+w bar.

Now echo can access the file and read and write it.

You see how both files are owned by the group users.

After changing the directory to not have the sticky bit.. and touchging a 
file.. I get this.

[EMAIL PROTECTED]:/home/shared-stuff$ ls -al
total 8
drwxrwxr-x2 root users4096 May  9 22:16 .
drwxrwsr-x   15 root staff4096 May  9 22:12 ..
-rw-rw-r--1 froddie  users   0 May  9 22:13 bar
-rw-r--r--1 echo users   0 May  9 22:13 foo
-rw-r--r--1 echo echo0 May  9 22:16 foobar

See how foobar is owned by echo.echo

The moral of this story:  Learn to use the group sticky bit  on directories :)



On Sunday 09 May 2004 9:26 pm, Silvan wrote:
 On Sunday 09 May 2004 02:53 pm, Ulrich Fürst wrote:
   Where is the file?  I don't run Mozilla, so I'm not familiar with that.
   Is it under /usr somewhere, or what?
 
  It's under /home/.mozilla/ ...
  In this directory and in subdirectories mozilla stores it's settings
  and the mails and so on.

 OK, let's back up again.  I'm still not completely clear what you have
 here. I think you have

 /home/you
 /home/your-wife

 Then you are trying to share files between each other by configuring
 various things to write directly to /home instead of /home/you or
 /home/your-wife

 Is that right?

 If so, that's very strange.  How do you even have write permission on
 /home? What is the permission on that directory?  It's supposed to be 755,
 and individual users are not supposed to be able to write to /home directly
 anyway.  I presume you've changed this.

 I guess you can do it that way if you insist, but it seems messy and
 difficult to manage safely.  Why not create a shared directory for the two
 of you with 775 permissions?

 Other posts that I missed previously already explained about setting your
 umask in various places.  With the right umask ( would work, or you
 could be more restrictive), and a directory you can both access it should
 be possible to do what you want.

 Something like this:

 [EMAIL PROTECTED] /home
 -mkdir shared-directory-demo
 [EMAIL PROTECTED] /home
 -chmod 755 shared-directory-demo
 [EMAIL PROTECTED] /home
 -chown root:your-family-group shared-directory-demo
 [EMAIL PROTECTED] /home
 -ls -ld shared-directory-demo/
 drwxrwxr-x2 root your-family-group 4096 May  9 21:04
 shared-directory-demo//
 [EMAIL PROTECTED] /home
 -cd shared-directory-demo/
 [EMAIL PROTECTED] /home/shared-directory-demo
 -su you
 [EMAIL PROTECTED] /home/shared-directory-demo
 -umask 
 [EMAIL PROTECTED] /home/shared-directory-demo
 -touch foo
 [EMAIL PROTECTED] /home/shared-directory-demo
 -ls -l foo
 -rw-rw-rw-1 you   you  0 May  9 21:04 foo
 [EMAIL PROTECTED] /home/shared-directory-demo
 -cd ..
 [EMAIL PROTECTED] /home
 -exit
 exit
 [EMAIL PROTECTED] /home/shared-directory-demo
 -su your-wife
 [EMAIL PROTECTED] /home/shared-directory-demo
 -umask 
 [EMAIL PROTECTED] /home/shared-directory-demo
 -touch foo
 [EMAIL PROTECTED] /home/shared-directory-demo
 -ls -l foo
 -rw-rw-rw-1 you   you  0 May  9 21:05 foo

 You've made a directory, chowned it to your-family-group, set it to 775 so
 the group can write there.  Then when you set your umask to 0 and create a
 file, your wife can then modify the same file, 

Re: Fish doesn't work in Cheney debs

2004-02-11 Thread Bart Dorsey
You might try using sftp:// Most ssh servers support sftp nowdays.

On Wednesday 11 February 2004 11:53 am, Antiphon wrote:
 Has anyone else had problems using the fish:// protocol in Konqueror with
 Chris's debs?


pgpfrDFjdeaZU.pgp
Description: signature


Re: Why Are Some Fonts So Bad ?

2004-01-04 Thread Bart Dorsey
On Saturday 03 January 2004 9:32 pm, Nick Boyce wrote:
 I'm running KDE 3.1.4 with XFree86 4.1.0-16 on Woody, with anti-aliasing
 switched on, and although the desktop mostly looks pretty slick, there
 are still some *really* bad font renditions in some parts of some
 windows.

The lines do cause some distortion, but not as bad when Anti aliasing is 
actually turned on.

Make sure your card can do the RENDER extension (xdpinfo should list it)

Also make sure you have fontconfig installed, and finally , make sure you have 
anti aliasing turned on in the Kcontrol fonts dialog box.

Here's an example of what it SHOULD look like.

http://thebucket.org/echo/kate-good-looking-fonts.png

BTW, apt-get install ttf-bitstream-vera 

the font I'm using there is Bitstream Vera Sans.


 For instance, the font used for the words Did you know ? in the Tip
 Of The Day dialogs offered by both Konsole and Kate is *awful* - it
 looks a mess ... utterly uneven and broken.

 I've put a screen-capture of the Kate Tip-Of-The-Day dialog on my
 website, at http://www.glimmer.demon.co.uk/kde/kate-lousy-font.png if
 anyone feels like having a look.

 Can anyone hazard a possible explanation for this ?
 Does anyone else see anything better looking in this dialog on their own
 machines ?

 (I use a Voodoo 3 graphics card, in case that's relevant, and the 3Dfx
 Voodoo 3 driver is selected in KXconfig).

 Cheers,
 Nick Boyce
 Bristol, UK


pgpiht3n12BOh.pgp
Description: signature


Re: Using mutt + kmail

2003-06-29 Thread Bart Dorsey
My solution to this was to setup and run courier-imap on my local machine...
both mutt and kmail can connect to imap servers...  this also gives me a nice 
way to read my email from somewhere else (use courier-imap-ssl for security)

I recommend Maildir with imap though, as courier-imap+Maildir is MUCH faster 
than uw-imap with mbox.

Also, the CVS version of KDE understand PGP/MIME, in fact, the kgpg 
integration in KDE 3.2 (cvs) rocks.


On Thursday 26 June 2003 9:51 am, Jens Benecke wrote:
 Hi,

 I like KMail for its GUI. I use mutt primarily (because I often read mail
 remotely via SSH), but I'd like to use KMail when working locally. I
 realize I'd have to

 - let KMail recreate its index files each time it starts up,
 - accept that KMail apparently cannot handle PGP/MIME correctly yet,

 Anything else? I use mbox files and I don't plan on changing this (with my
 mail volume, maildir is about 10x as slow when using mutt...)



 --
 Jens Benecke
 http://www.hitchhikers.de - Europaweite Mitfahrzentrale
 http://www.rb-hosting.de - Webhosting mit Extras - SSH - Günstiger Traffic


pgpkySAniS6Fn.pgp
Description: signature