Announcement

Collapse
No announcement yet.

Changing permissions with chmod

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing permissions with chmod

    I'm having some problems with permissions in apache's document root. I set up all the folders to 777 and files to 644, but when I checked them recently I seem to have some files with 777 and that can't be good.

    I'm not too good with terminal commands, is there a nice easy way I can use chmod to sort it all out for me without having to go through and change them all separately?

    Is there an easy way to make sure new files I create end up with the right permissions, or do I have to check them as I go?

  • #2
    I think it's "chmod -R" or with an -r switch somewhere in it. You can find out the available switches by doing "chmod -h" or "chmod --h" (same for any command). The 'r' stands for recursive, so you could use it on your docroot.

    I think if you create a new file with gedit it should inherit permissions of 644, since that's the 'normal' way. Why do you want 777, not that I really have much of a clue as to what the difference is right now? Isn't that everyone can read, write and so on? I wouldn't give anybody any more permissions, or any file I mean, than it needs.

    Comment


    • #3
      644 is read for everyone and write for me, but i need folders to have execute permissions in order for apache to serve what is in them. I was advised by someone on ubuntu forums to use 777 on folders. The thing is if I use chmod -R (which I did before) I then have to go back and change all the folders. Is there not an easier way lol.

      Comment


      • #4
        you could use chmod -x to give execute permissions, or alternatively i suggest using 775 which allows read and execute for all users, but only write for you.

        Pricey

        Comment

        Working...
        X