@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16



Comments:

<0> so that command goes for any directory, right ?
<1> Al-Ashtar: nope, any file and directory
<1> which is not right
<1> cd /var/www
<0> oh
<1> find . -type d -exec chmod 750 {} \;
<1> find . -type f -exec chmod 640 {} \;
<0> first command "chmod: changing permissions of `.': Operation not permitted"
<0> second command no output
<1> do it as root
<1> and oh
<1> it was www-data:ali
<1> so you need 770 for dirs and 660 for files
<0> so I replace 750 with 770 ?
<1> yes :)
<0> root@Ubuntu:/var/www# find . -type d -exec chmod 770 {} \;



<0> root@Ubuntu:/var/www# find . -type f -exec chmod 660 {} \;
<0> root@Ubuntu:/var/www#
<0> ok can you explain what we just did ?
<0> so this one "chown -R www-data:ali /var/www; chmod -R 775 /var/www" should also be changed to 770 ?
<1> no, don't chmod anything else :)
<0> ok
<1> i found a great video tutorial on permissions once
<1> now i can't :/
<1> let me try and explain it
<1> you have a file with the permission of -rw-r--r--
<1> this == 644
<0> http://cals.arizona.edu/ecat/web/permissions.html
<0> why not 645
<0> how can you calculate it
<2> 4 = read 2 = write 1 = execute
<1> you see 1 = exec; 2 = write; 4 = read
<1> yeah :)
<2> add them all
<2> lolz @ iddqd
<1> 6 = rw
<1> :)
<1> 7 = rwx
<0> oh
<0> give me one
<0> let me calculate it
<2> waaaaaaaaa
<1> hahaha
<0> lol
<2> math tutorial??
<2> hahaha
<0> yes, it's a linux thing :P
<1> Al-Ashtar: good thing it's not an umask :)
<1> cuz they use octal numbers there :)
<0> iddqd: http://cals.arizona.edu/ecat/cl***es/videoclips.html
<0> found'e,
<0> found'em
<2> yeah umask... i really hate that.. hehehe it would be better if the use HEX/BINARY numbers
<2> it's easier to convert.. :D
<2> and understand.. :D
<0> drwxrwx--- 2 www-data ali 4096 2006-07-25 15:25 www
<0> rwx=7 rwx=7 ---=0
<0> hmmm
<1> :)
<1> you can use rwx with chmod too
<0> ok we did this
<0> chmod -R 775 /var/www
<0> so that's
<0> rwx rwx rx !
<3> x=1 w=2 r=4
<1> yes, but that will change the perm of any file and dir in /var/www to 775
<2> it's recursive
<2> :D
<3> Hence the -R
<0> I don't get it
<4> i think iam sick
<4> gotta sleep, nite all
<3> What are you trying to understand? I'll try to help you.
<0> slicers: congratulations you're pregnant :D
<2> hahaha
<0> p3nguin: when trying to give www-data & ali access to /var/www/ we did this
<0> chown -R www-data:ali /var/www; chmod -R 775 /var/www



<0> so the second command would give www-data & ali
<0> rwx rwx rx
<0> right ?
<3> Yes, to /var/www and everything under it.
<0> great
<0> now look
<0> root@Ubuntu:/var# ls -l |grep www
<0> drwxrwx--- 2 www-data ali 4096 2006-07-25 15:25 www
<3> uh...
<0> because we did find . -type d -exec chmod 770 {} \;
<3> ls -ld /var/www
<0> and find . -type f -exec chmod 660 {} \;
<3> Why are you working in /var?
<0> to ls and see www
<0> I didn't know that you can -ld
<0> anyway
<3> Why use two commands when you can use only one?
<3> I never move out of my homedir.
<0> because I didn't know that you can -ld
<0> hehe
<0> now I'm REALLY confused
<3> So anyway... you changed the permission on the directory but it didn't show it when you did ls on it.
<0> root@Ubuntu:/var/www# ls -l /var/www/
<0> total 0
<0> lrwxrwxrwx 1 www-data ali 21 2006-07-25 11:05 phpmyadmin -> /usr/share/phpmyadmin
<0> so that would be 777
<1> nope, its a link :)
<3> Yes, symlinks almost alaways have rwxrwxrwx.
<0> oh
<3> The l on the front indicates it is a link.
<0> let me create a file
<3> The link has rwxrwxrwx, then you set the permissions on the real file where the link points to.
<0> hmm
<0> the part confusing me that we 775 first, then 770 and 660
<3> You'll see d, b, c, l, p, and s on that first spot as you start using your system more and more. It's covered in ls(1), the man page for ls.
<0> I hate man pages
<3> When you use the code such as 775 it is absolute, meaning it completely overrides and changes to that given mask.
<0> never could understand them
<0> no examples
<0> ok
<3> They're really just for reference. Some of them have examples, if they were written by some of the better guys.
<0> so 775 to override anything set before
<3> If you were to use chmod u=rwx that would also be absolute, as you set it to be equal to rwx.
<0> as in chmod u=rwxrwx---
<3> You can, however, use something like chmod g+wx to add wx to the group.
<0> ?
<3> No.
<3> Let's break it down a bit...
<0> ok
<3> lrwxrwxrwx means l rwx rwx rwx
<3> The l is the type, the first set of rwx is for the owner of the file, the second set of rwx is for the group, and the last is for everyone else (sometimes called the world).
<0> ok
<5> does it? i don't think the "rwxrwxrwx" part is even significant
<5> symlinks don't have permissinos
<0> ok go on
<3> Al-Ashtar: Ignore him, i'm teaching you how to set permissions... not teaching you about symlinks today.
<0> I did
<0> hehe
<3> If I wanted to change the permission on a given file to remove all access from the world, but leave the owner being able to read and write it and the group to only read it, you could chmod u=rw,g=r,o-rwx or chmod 640
<0> oh
<0> user group other
<0> ok
<3> exactly.
<3> Now you can also use "a" to mean all (owner group other). chmod a+x
<0> cool
<3> chmod a+x simply means u+x,g+x,o+x
<0> as is 777
<0> no
<0> wait
<0> 111
<3> No, that would be chmod a=1
<3> The code 111 is absolute.
<0> oh
<3> You could say it added a 111 to it, but that might get confusing.


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #linux
or
Go to some related logs:

milllet nbr
#kl
#india
#india
wu yue tian bittorrent
#unixer
#chat-world
#worldchat
#india
#unixer



Home  |  disclaimer  |  contact  |  submit quotes