Home > Archive > Linux/Unix > June 2002 > 2 questions...





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author 2 questions...
Boulware5

2002-06-18, 6:55 pm

I'm in the process of studying for Linux+. So far I am a bit foggy on two issues.

1. Is there any reason why you would upgrade your XFree86 version besides having support for your newest greatest video card and/or monitor? I couldn't think of any other reason to. Do some newer Windows Managers require an updated XFree86?

2. I don't know if this is beyond the scope of Linux+ but I'm having trouble coming up with file and directory permissions for certain umask values. I could just memorize it. For instance:

Umask 077 is rwx------ for files and rw------- for directories.

But there's a better way of coming up with it. My book mentions the umask and file mode values are derived from subtracting the umask value from the 777 value of complete rights. So for a umask of 022.....Would that be 777-022 = 755. So would that mean Umask 022 = rwxr-xr-x? But that's not right as Umask 022 is rw-r--r--.
dpx

2002-06-18, 7:42 pm

1. the only thing about Xfree86 you need to know for L+ is where are the log and config files and what tools are available like xf86config
2. by default a NEW file with umask 022 has -rw-r--r--, to make the file executable you will have to use chmod a+x after you make the file and the file will be rwxr-xr-x
Boulware5

2002-06-18, 7:52 pm

dpx:

#1. LOL, that's fine but I want to also learn beyond Linux+.

As far as #2, you didn't really answer it. Say I am given a Umask of 027 and I want to know what the file and directory permissions would be. How would I do that.
dpx

2002-06-18, 8:08 pm

so if you have umask of 027
that is 777-027=750
7=rwx for owner (r=4)+(w=2) +(x=1)
5=rx for group (r=4) + (x=1)
0=-- for users
hope it helps
i'm not an expert
i also study for Linux+
Boulware5

2002-06-18, 8:25 pm

ahhh ok. My problem was I was trying to do that for file permisions. What you did is produce the directory permissions from that umask and not the file.

Looking at the directory permission, I see you can just take away the execute flag and you will have the file permission for that particular usmask.

So umask 027 is rwxr-x--- for DIRECTORY and rw-r----- for FILE permission. (without the x's)

Got it now. I just got the file and directory permission mixed up. Thanks.
dpx

2002-06-18, 8:40 pm

you got my confuse .....i'm sure in linux all the files and directory's use the same umask values and same permissions
dpx

2002-06-18, 8:46 pm

quote from Linux+exam cram page 227
" Everything in Linux is a file.Directories,drivers,and links are all just special kinds of files.....
You can set the default permissions with umask ; you can change permissions with chmod"
Boulware5

2002-06-18, 9:04 pm

quote:
Originally posted by dpx
you got my confuse .....i'm sure in linux all the files and directory's use the same umask values and same permissions


What I am saying is the umask IS the same for files and directories. However, the file permissions are slightly different between files and directories. read, write, execute means something different with directories. The read permission for a directory means you can use the ls command to list the files, write means you can add and remove files and directories from that directory and execute means you can use the cd command to change to the directory or use the directory as part of a pathname.

With Umasks, if we take a umask of 000:
File permission: rw-rw-rw-
Directory Permission: rwxrwxrwx

So it is different when talking about directories and files.

Understand what I'm saying?
dpx

2002-06-19, 2:56 am

yes i got that sorry for the misunderstanding
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net