Find the answer to your Linux question:
Results 1 to 10 of 10
ok i was wondering how i would go about setting permissions to a file and hwne i do that it changes all the files in the directory to the same ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901

    Setting Premisions


    ok i was wondering how i would go about setting permissions to a file and hwne i do that it changes all the files in the directory to the same permission that the parent directory has.
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    Is this any good:
    http://www.this_site_does_not_exist/viewtopic.php?t=96

    you can use the "*" card to specify all files, and -r or -R (forgot which) to say recursive (all subdirectories).

    Jason

  3. #3
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901
    not really i dont think any of them let every file inside the directory change as well. i tryed the chmod 777 directory and it changed the directory permissions but it left everything inside it alone. maybe it wont matter if i change them or not
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    if you've done the directory 777, then to do all the files and folders inside the same: "chmod 777 /path/to/dir/* -R"

    Jason

  6. #5
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901
    ok i will give that a try
    thanks
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

  7. #6
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901
    that command worked perfectly jst the way i wanted it to it made it so much easier then goin thru and changing each file seperately. i only need to do half of them but its better to change all since now i know for a fact that i cant run into anymore of these dang permission errors on my programs.

    thats one thing that bothers me. when i write a program and it runs perfectly on my system and then i go and put it on someone elses system and it seems to work great then all of a sudden we start getting permission errors. /rant over
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

  8. #7
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    If it's a C program, or any other program with a Makefile, I tend to put chmod and chown commands into the makefile itself, usually solves the problem to some degree.

    Jason

  9. #8
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901
    ts a Visual Basic program that is connectly to files on the network using samba. all i really do here at work is vb. but after i get c++ down i hope they will let me dable in that alittle.
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

  10. #9
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025
    if you've done the directory 777, then to do all the files and folders inside the same: "chmod 777 /path/to/dir/* -R"
    Is that in you chmod tut? If not could you include it?

    Thanks,
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  11. #10
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901
    it doenst seem to be in the tut. and i couldnt even find it on the page that the tut links too. so it probably would be a good thing to add to the tut.

    edit: i am now a linux Engineer with 250 posts sweet

    Edit by flw: K's da man, K's da man, K's da man
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •