Folder Permission Issues

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
squirrelof09
This is my homepage
This is my homepage
Posts: 76
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Mon Mar 14, 2011 5:09 pm

Folder Permission Issues

Post by squirrelof09 »

Greetings. I am having an issue where newly created directories are not inheriting group permissions. I can't understand what I am doing wrong here. I'm running Centos 6.3

I have a teamspeak 3 server running and an apache virtual host linked to the file uploads directory within it.

I have the teamspeak server software running as user teamspeak
and the apache httpd software running as user apache

/home/teamspeak/teamspeak/teamspeak3-server_linux-amd64/files/ is chmod to 2740 with User being teamspeak and group being apache (I have applied this to all files and folders within the path)

When a client in my teamspeak 3 server creates a new directory within their upload area, the chmod permissions of the new folder becomes chmod to 2700 with user teamspeak and group apache,
thus apache group by default has no read permissions on this folder. an example of the path to this users folder (/home/teamspeak/teamspeak3-server_linux-amd64/files/virtualserver_1/channel_12/broski/blahblah/)

How would I fix this where the chmod of the newly created directory inherits 2740 from the parent?
squirrelof09
This is my homepage
This is my homepage
Posts: 76
Joined: Mon Mar 14, 2011 5:09 pm

Re: Folder Permission Issues

Post by squirrelof09 »

My mistake, the chmod needs to be 2750, not 2740. couldn't edit post :/
User avatar
Edge100x
Founder
Founder
Posts: 12947
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Folder Permission Issues

Post by Edge100x »

I don't know if there's a way to have TS3 create folders with different permissions. If there isn't, you would need to run a command regularly, such as through a crontab, in order to adjust them; or, you could run the TS3 server under the "apache" user directly.

I haven't experimented with set-group-ID bits on the TS3 folder, either. I'm not sure why it would be setting that.
squirrelof09
This is my homepage
This is my homepage
Posts: 76
Joined: Mon Mar 14, 2011 5:09 pm

Re: Folder Permission Issues

Post by squirrelof09 »

Set-group-id bits?

When I was doing some googling around on this, one thing that was giving me some hints to try was ACL permissions? Do these cause folders to inherit permissions?
User avatar
Edge100x
Founder
Founder
Posts: 12947
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Folder Permission Issues

Post by Edge100x »

The "2" at the beginning means set-group-id.

I haven't experimented with ACLs in Linux. I'd recommend one of the two solutions I posted.
squirrelof09
This is my homepage
This is my homepage
Posts: 76
Joined: Mon Mar 14, 2011 5:09 pm

Re: Folder Permission Issues

Post by squirrelof09 »

Okay I think I will go for the running as apache user. Thanks for the help John!!
Post Reply