0

I am trying to setup a Minecraft server, and I decided to run the server on a limited user, who only has access to the Minecraft server directory. I couldn't get the user to have permission, even though I set the owner to the user, and game it 777 to the directory. So I set the directory's access to 777 and I still can't access the directory. Any thoughts as to what I'm missing? Thanks, Max

EDIT:Alright, I fixed it by opening up the directory the minecraft server folder was in.. Is this always needed? Example: My server is in /srv/minecraftServer/ I opened minecraftServer to the server user, but not srv. When I opened srv (allowing the limited user to also see my web host, not really a limited user anymore), the user was able to access the minecraftServer directory.. Is this normal, and is there a way around this?

chicks
  • 3,793
  • 10
  • 27
  • 36
Jess
  • 389
  • 1
  • 6
  • 16

3 Answers3

2

NEVER NEVER NEVER USE 777 PERMISSIONS AS A FIX!

Ok, now that I got that out of the way...

When looking at permissions for directories, this is the thing to remember: The user must have execute permissions on ALL directories between / and the target directory.

For file permissions, the read/write/execute bits make sense, but for directories their meaning changes slightly. Read and write mean you can read and write files inside the directory, and execute means you can traverse it (you can 'cd' into it).

Read up on permissions - there's more control to be had if you understand the different bits. http://en.wikipedia.org/wiki/Filesystem_permissions

And NEVER use 777 - it is (almost) never necessary, and its always a bad idea.

baumgart
  • 2,483
  • 18
  • 17
0

Perhaps the sticky bit or something similar, which might have something to do with directories inheriting permissions, is set. Try chmoding to 0777.

LawrenceC
  • 1,202
  • 7
  • 14
0

Paraphrasing baumgart, don't get in the habit of fixing permissions issues w/ 777 (which I assume you meant by 'opening up the directory minecraft was in'). It is probably ok to to in order to verify that permissions are the issue, but should not be left that way. Most likely 755 (or u=rwx,g=rx,o=rx if you prefer symbolic) will be what you need. The user needs to be able to read and execute to descend into a directory. This is the way directory permissions work, so there isn't really any way around this.

It is possible to get some more granular control by using access control lists, but that can make permissions quite confusing. You still need the user to have read and execute to access the directory though.

Alex
  • 6,603
  • 1
  • 24
  • 32