[SOLVED] Help with permissions on Linux CLI

Currently trying to setup a TS Server again now that I have TS5 access and I’m running into permissions issues following tutorials to get it setup as a service. Seems the teamspeak user we are told to create in most guides doesn’t have access to it’s own home folder structure? Anyone know how to get the permissions set. It won’t let me connect, No IPTables and NO FIrewall running on the local machine.

Anyone have any ideas?

Apr 01 00:44:16 teamspeak-server ts3server_minimal_runscript.sh[1693]: 2021-04-01 00:44:16.065717|INFO |Query | |listening for ssh query on 0.0.0.0:10022, [::]:10022
Apr 01 00:44:16 teamspeak-server ts3server_minimal_runscript.sh[1693]: ERROR: openFile( file:logs/ts3server_2021-04-01__00_44_13.659997_0.log) failed
Apr 01 00:44:16 teamspeak-server ts3server_minimal_runscript.sh[1693]: 2021-04-01 00:44:16.066219|INFO |Query | |listening for http query on 0.0.0.0:10080, [::]:10080
Apr 01 00:44:16 teamspeak-server ts3server_minimal_runscript.sh[1693]: ERROR: openFile( file:logs/ts3server_2021-04-01__00_44_13.659997_0.log) failed
Apr 01 00:44:16 teamspeak-server ts3server_minimal_runscript.sh[1693]: 2021-04-01 00:44:16.066646|INFO |CIDRManager | |updated query_ip_allowlist ips: 127.0.0.1/32, ::1/128,
Apr 01 00:44:16 teamspeak-server ts3server_minimal_runscript.sh[1693]: ERROR: openFile( file:logs/ts3server_2021-04-01__00_44_13.659997_0.log) failed
Apr 01 00:44:16 teamspeak-server ts3server_minimal_runscript.sh[1693]: 2021-04-01 00:44:16.162043|ERROR |DatabaseQuery | |db_exec failed attempt to write a readonly database
Apr 01 00:44:16 teamspeak-server ts3server_minimal_runscript.sh[1693]: ERROR: openFile( file:logs/ts3server_2021-04-01__00_44_13.659997_0.log) failed
Apr 01 00:44:16 teamspeak-server ts3server_minimal_runscript.sh[1693]: 2021-04-01 00:44:16.162580|ERROR |DatabaseQuery | |db_exec() DELETE FROM revocations WHERE revocation_type = 0; error: attempt to write a readonly database
Apr 01 00:44:16 teamspeak-server ts3server_minimal_runscript.sh[1693]: ERROR: openFile( file:logs/ts3server_2021-04-01__00_44_13.659997_0.log) failed

Use chmod 755 to set the needed permissions then.

1 Like

This doesn’t seem to be working. I’ve done a “sudo chmod -R 755 /home/teamspeak” and all files still say that root is the owner and it’s not loading. Not sure what I am doing wrong as I’ve never run into this previously.

[email protected]:~$ ls -lah /home/teamspeak
total 22M
drwxr-xr-x 9 teamspeak teamspeak 4.0K Apr 1 00:25 .
drwxr-xr-x 4 root root 4.0K Apr 1 00:18 …
-rwxr-xr-x 1 teamspeak teamspeak 220 Apr 1 00:18 .bash_logout
-rwxr-xr-x 1 teamspeak teamspeak 3.7K Apr 1 00:18 .bashrc
-rwxr-xr-x 1 teamspeak teamspeak 807 Apr 1 00:18 .profile
-rwxr-xr-x 1 root root 0 Apr 1 00:21 .ts3server_license_accepted
-rwxr-xr-x 1 root root 72K Apr 1 00:20 CHANGELOG
-rwxr-xr-x 1 root root 67K Apr 1 00:20 LICENSE
drwxr-xr-x 3 root root 4.0K Apr 1 00:20 doc
drwxr-xr-x 3 root root 4.0K Apr 1 00:21 files
-rwxr-xr-x 1 root root 1.1M Apr 1 00:20 libts3_ssh.so
-rwxr-xr-x 1 root root 930K Apr 1 00:20 libts3db_mariadb.so
-rwxr-xr-x 1 root root 1.3M Apr 1 00:20 libts3db_postgresql.so
-rwxr-xr-x 1 root root 2.1M Apr 1 00:20 libts3db_sqlite3.so
drwxr-xr-x 2 root root 4.0K Apr 1 00:21 logs
-rwxr-xr-x 1 root root 14 Apr 1 00:22 query_ip_allowlist.txt
-rwxr-xr-x 1 root root 0 Apr 1 00:22 query_ip_denylist.txt
drwxr-xr-x 2 root root 4.0K Apr 1 00:20 redist
drwxr-xr-x 2 root root 4.0K Apr 1 00:20 serverquerydocs
drwxr-xr-x 6 root root 12K Apr 1 00:20 sql
-rwxr-xr-x 1 root root 3.2K Apr 1 00:22 ssh_host_rsa_key
-rwxr-xr-x 1 root root 14M Apr 1 00:20 ts3server
-rwxr-xr-x 1 root root 2.7M Apr 1 00:21 ts3server.sqlitedb
-rwxr-xr-x 1 teamspeak teamspeak 32K Apr 1 13:49 ts3server.sqlitedb-shm
-rwxr-xr-x 1 teamspeak teamspeak 0 Apr 1 00:25 ts3server.sqlitedb-wal
-rwxr-xr-x 1 root root 117 Apr 1 00:20 ts3server_minimal_runscript.sh
-rwxr-xr-x 1 root root 2.6K Apr 1 00:20 ts3server_startscript.sh
drwxr-xr-x 2 root root 4.0K Apr 1 00:20 tsdns

I also did a chown for the teamspeak user but it still seems to not like it as it throws the same error on reboot.

Apr 01 13:49:49 teamspeak-server ts3server_minimal_runscript.sh[954]: 2021-04-01 13:49:49.191600|INFO |Query | |listening for ssh query on 0.0.0.0:10022, [::]:10022
Apr 01 13:49:49 teamspeak-server ts3server_minimal_runscript.sh[954]: ERROR: openFile( file:logs/ts3server_2021-04-01__13_49_36.596139_0.log) failed
Apr 01 13:49:49 teamspeak-server ts3server_minimal_runscript.sh[954]: 2021-04-01 13:49:49.191781|INFO |Query | |listening for http query on 0.0.0.0:10080, [::]:10080
Apr 01 13:49:49 teamspeak-server ts3server_minimal_runscript.sh[954]: ERROR: openFile( file:logs/ts3server_2021-04-01__13_49_36.596139_0.log) failed
Apr 01 13:49:49 teamspeak-server ts3server_minimal_runscript.sh[954]: 2021-04-01 13:49:49.194922|INFO |CIDRManager | |updated query_ip_allowlist ips: 127.0.0.1/32, ::1/128,
Apr 01 13:49:49 teamspeak-server ts3server_minimal_runscript.sh[954]: ERROR: openFile( file:logs/ts3server_2021-04-01__13_49_36.596139_0.log) failed
Apr 01 13:49:49 teamspeak-server ts3server_minimal_runscript.sh[954]: 2021-04-01 13:49:49.232622|ERROR |DatabaseQuery | |db_exec failed attempt to write a readonly database
Apr 01 13:49:49 teamspeak-server ts3server_minimal_runscript.sh[954]: ERROR: openFile( file:logs/ts3server_2021-04-01__13_49_36.596139_0.log) failed
Apr 01 13:49:49 teamspeak-server ts3server_minimal_runscript.sh[954]: 2021-04-01 13:49:49.232709|ERROR |DatabaseQuery | |db_exec() DELETE FROM revocations WHERE revocation_type = 0; error: attempt to write a readonly database
Apr 01 13:49:49 teamspeak-server ts3server_minimal_runscript.sh[954]: ERROR: openFile( file:logs/ts3server_2021-04-01__13_49_36.596139_0.log) failed

And I can’t even connect it’s like it’s not even running.

Just following up if someone can help with Linux perms. This hasn’t happened with my previous install before it went haywire.

try to change the owner or the perms for the /home/teamspeak/logs directory, looks like it has problems to gain access to it

I’ll give that a try!

1 Like

Looks like you’ve uploaded the files as root and then tried to start the server under the teamspeak user. Also, you’ve put the files directly into the home directory of that user, which is… ugly. Anyway… do this:

cd /home
chown -R teamspeak:teamspeak ./teamspeak

This will change ownership of all files in the teamspeak folder and should fix your issue.

3 Likes

I’ll give it a shot. Tried that line in most of the tutorials I tired following but it never stuck for some reason I’ll give it a try too and follow up here shortly.

Odd thing is that I was never signed in as root. Just from my account had to use sudo to unpack and configure files from my login account and not the teamspeak -disabled login account.

Thank you so much! Not sure why it wouldn’t take the command before from the tutorials but that did the trick! Much appreciated. I’m going to compile my own instructions and include this for my future reference.

twitch instagram twitter facebook