mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-25 14:15:59 +03:00
[GH-ISSUE #872] fastdl module error #703
Labels
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LinuxGSM#703
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JimTR on GitHub (Jun 9, 2016).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/872
Originally assigned to: @UltimateByte on GitHub.
I have been trying to use the fastdl module however I get problems with it . the problem is the fastdl folder it is hard coded to {$rootdir}/www assuming the folder needs to be resolvable quite a few web servers place there public facing code in a folder under the users root directory called public_html
example : /home/jimr/public_html/fastdl could resolve to http://mydomain.com/fastdl.
if the fastdl folder needs to be resolvable over the web you may want to check the apache or nginx setup files for the user for where the resolvable folder is (document root) these on apache2 are located in /etc/apache2/sites-enabled and are normally named something like mydomain.com.conf. so calling
awk '$1~/^DocumentRoot/{print $2}' /etc/apache2/sites-enabled/mydomain.com.confwill return something likedoing it this way relies on knowing the domain name but does give the resolvable folder the same is true if you set up a sub domain you may get a response like
dependant on where the doc root for the sub domain is. If fastdl folder does not have to be resolvable ignore this
@UltimateByte commented on GitHub (Jun 9, 2016):
Did you read this ?
https://github.com/dgibbs64/linuxgsm/wiki/FastDL
@UltimateByte commented on GitHub (Jun 9, 2016):
FastDL has to be resolvable. But it's still the user that has to setup his server accordingly.
It's intended to work with usermod or with manual virtual hosts.
For now, garry's mod is the only supported game.
@JimTR commented on GitHub (Jun 9, 2016):
that was what is was playing with but it is hard coded to www, so the user has to edit the module to reflect where the actual files are located ... tools such as Plesk or Virtualmin can take the problems of creating apache vhosts (configuring everything correctly for you) but do tend to use public_html are the doc root. I added the issue because I read
so using Virtualmin (share/freeware) may be a lot easier to use than manually setting up a lamp stack and learning how to use it as Virtualmin does most of the work for you
example Vitrtualmin apache directives
above is an average virtualmin conf file overwriting this with your simplified conf file could screw up loads of options that are set, in this example, by Virtualmin or by Plesk, my thought was for the script to find out what has been set and use it rather than overwriting the file. That said with customers I host I don't allow write access to those files so they are not editable, so no chance of changing them. So the user will have to edit the module.
@UltimateByte commented on GitHub (Jun 9, 2016):
I can rename
wwwtopublic_htmlif you think it's more standard. I don't wish to move away files from the user though. LGSM has a philosophy of "everything inside the user folder" which i like and don't wish to change.Virtualmin and Plesk users are not really my problem. I don't think LGSM is meant for them though.
A LAMP server isn't required, Apache2 is enough. Take 2 minutes to install and setup.
Done
@JimTR commented on GitHub (Jun 9, 2016):
I am thinking of the web interface here as it will need php & mysql enabled to work hence the lamp stack.
So I guess as things are the only place you can use this is either on a home pc that is acting as web/game server or an unmanaged VPS unless I have missed something.
home pc option could run into DNS problems as the domain name really does need a static IP & certain ISP's may not allow you to open ports on the supplied router etc. etc.
unmanaged VPS you may need to run bind to propagate the DNS records.
I don't quite get this :-
if you look at the example the user name is gamer and all references point to that users home folder.
@cedarlug commented on GitHub (Jun 9, 2016):
Is there a reason why a simple simlink public_html -> www doesn't solve the problem?
@UltimateByte commented on GitHub (Jun 11, 2016):
Yup, we can even change "www" to "public_html" into the code's variable if that helps.
I prefer "www" than "public_html" just because i'm used to work like that, but public_html is more standard.
@JimTR commented on GitHub (Jun 11, 2016):
Cool, another point I noticed when the module sets up it makes the folder under where the script is located, this may not be the users home folder ... I, for example, have the following for most users, where the game servers are installed under the games folder then game name, and public_html is located in the root, this approach stops http connections direct access to the game servers folders . perhaps consider adding the www/public_html folder to the users root rather than under the game root, also the user may want to add other content to www/public_html (forum or something) and it may be a bit messy having the web root folder nested in the game root folder. In the example below this user has 3 games installed, you could create 3 virtual hosts pointing to 3 folders under each game root (I know the example games do not all support fastdl it is an example) or just have all the web content under 1 folder split by game
e.g ~/public_html/gmod/fastdl and ~/public_html/fof/fastdl etc. this means 1 virtual host per user rather than 3
Sample users home folder
.
├── games
│ ├── css
│ ├── fof
│ └── gmod
├── Maildir
│ ├── cur
│ ├── new
│ └── tmp
├── perl5
│ ├── lib
│ └── man
├── public_html
└── Steam
├── appcache
├── config
├── depotcache
├── logs
├── steamapps
└── userdata
notes on above: Maildir email folder is there if you configure postfix to store user email in the users root rather than postfix's std which is /var/mail. This folder can be ignored along with the perl5 folder this is my dev user and am playing with perl web apps rather than php to see if there is an advantage using perl
With the www/public_html folder being nested a few folders deep I guess you have to give the apache user (default www-data) access to the users root folder ? As without granting www-data permissions to the folders above the public_html/www folder apache may throw a forbidden error as the apache user does not have access to them. To fix this you could change the apache user to the same user as the game server user. This leads me on to if you have 2 games, that support fastdl, running as 2 different users, if you have changed the apache user to match the user of game 1 the user of game 2 will not be able will not be able to use the fastdl module as the apache user is the wrong user !
To fix that point perhaps you need to point out that when setting up apache you could use suEXEC to allow different users to be the apache user to do this make sure suEXEC is installed and enabled in apache and add the required user & group id to the host file .
example Directive :-
SuexecUserGroup "#1003" "#1003"this sets userid/groupid 1003 to be the apache user for say the web space me.domain.com, if you have a second game set up for fastdl under a different user just change the directive to the correct unix user in the hosts file.@cedarlug I don't like using symlinks in any web space they do work, but some clever hackers may be able to use a symlink to gain access to parts of the server they should not.
@UltimateByte commented on GitHub (Jun 11, 2016):
Got no time to read the whole thing now, gotta go play some music, but LGSM currently doesn't have a variable with the game's name. So yeah, it'd be cool to have ~/public_html/servername/fastdl but i see no way of doing it without a code rework.
@JimTR commented on GitHub (Jun 11, 2016):
you do have a servicename & gamename defined in the server script (gmod this is the LGSM script I am basing it on) perhaps you could use one of those ? I would use the servicename just in case someone runs more than one server on the same install. enjoy listening to Led Zep 😄
@UltimateByte commented on GitHub (Jun 11, 2016):
What if a user has two server for the same game ? We can use the port, but what if a user changes his server's ports ? :o)) Say i got 8 gmod servers (true story, fuck my life), it happened in the past that i reorganized ports.
We got no unique ID per server, that's the issue.
I play the drums, and sorry for the deception but i don't like Led Zep very much (and i've been blamed enough about that, don't worry) :p
@JimTR commented on GitHub (Jun 11, 2016):
ah I see ... never thought of reorganising the ports do people do this often ? oh well perhaps we need one (unique id) perhaps the server run filename
basename "$0"😄@UltimateByte commented on GitHub (Jun 11, 2016):
Maybe a little file in lgsm folder ?
@JimTR commented on GitHub (Jun 14, 2016):
whichever you think
@UltimateByte commented on GitHub (Aug 28, 2016):
Renamed to public_html
Won't change to a more advanced foldername than the one set currently as it wouldn't fit current LGSM's policy.
However, if you wish to change it in your fork, it's quite easy, as the destination folder is set in two variables :
https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/functions/command_fastdl.sh#L15
You can add any LGSM's variable that you wish. Port, servicename, and so on.
@lock[bot] commented on GitHub (Jul 19, 2018):
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.