PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Problem deploying a dynamic web site in Linux
Problem deploying a dynamic web site in Linux
Iniciado por guest, 14,abr. 2015 18:15 - 8 respuestas
Publicado el 14,abril 2015 - 18:15
Hello:
Now that I have the WebDev App.Server running on ubuntu 12.04, I would like to deploy a dynamic web site.

I checked ftp is up and running. In fact I can acces linux from a windows machine using an ftp client. So this is Ok.

In the Deployment parameters, after setting the server IP adress, Passive FTP mode, and the user accounts (both WebDev and FTP accounts) with the right passwords, I try
"Test the parameters", but it immediately finishes with this error:

INFValidating the password for WebDev account GUS with TEM57D2.tmp file
Failure opening the file/home/gus/ftp_webdev/TEM57D2.tmp Unable to open file.
System Error Details: Permission denied ERRFTP FINCGI

I can check the TEM57D2.tmp file exists in the ftp_webdev directory, but it seems it can't be read back (or something else).

It seems like it's a permission issue, but so far this is the configuration I have:

drwxr-x--- 2 gus webdevadmin 4096 Apr 14 07:55 ftp_webdev

however, the created file has a different permissions;

-rw------- 1 gus gus 34 Apr 14 07:55 TEM57D2.tmp

I tried running the command
sudo chmod g+s ftp_webdev , so created files inherit the directory permissions, but still doesn't work.

Any idea? Should the created temp files have same permissions than the directory?

The other think that comes to my attention is how WebDevAdministrator uses Capittal letters for usernames, which definitely is not allowed in Linux for user names (unless you force it).

Regardsl
Gus
Publicado el 14,abril 2015 - 20:09
Hi Gus

I cannot help you on the linux side at all... However this kind of error should come from the same thing in windows and linux, so I may be able to shed some light...

In the deployment process, there are several phases :
1. via ftp, upload the new installer
2. send a httprequest to the webdev server in order to tell it to take it from there and more specially
3. the webdev server TRIES to access the uploaded file, read it and basically execute it (as it is an installer)

As the test the parameters uses the same process with a very small file for validation, it seems that you have a problem on step 3, because the user running the webdev server does not have adequate permissions on the file in question.

Why and how is entirely up to you <img src="/NG2013_WEB/ui/smiley/1.gif" align=absmiddle border=0 alt=":-)">

Best regards
Publicado el 14,abril 2015 - 20:43
Hello Fabrice:
Thanks for the reply.

I agree. However, in my case, it seems the process gets stuck in the fist step, because it only uploads a temporary file and it stops there.

It seems the process is trying to determine if it has access to the ftp_webdev directory to upload the installation. I think it uses a temporary file to check the access. Indeed, the temporary file is there, but it seems the process can't access it or somehow it determines it has no access, and thus, the process finish with the Permission denied error.

I also tried to upload files from the FTP client from Windows, and all transferred files has the same permissions, so now I'm not sure what the Deployment process expect. I can also download the temporary files from the ftp client, so the files are indeed accessible.

Any other thoughts?
Thanks
Gus
Publicado el 14,abril 2015 - 21:21
Actually, after analyzing the TCP packets with wireshark, I can see that there is no issue with FTP.
The temporary file uploaded (apparently) contains the (encrypted) password for the WEBDEV account. So after this file is uploaded, the Deploy process sends the install request to the application server (step 2). This is;

GET /WD190AWP/WD190Awp.exe/INSTALL/PASSINST/TEMF2D0.tmp/GUS HTTP/1.1

and after that, the App Server replies with:

INFValidating the password for WebDev account GUS with TEMF2DO.tmp file...

And finally;

Failure opening the file /home/gus/ftp_webdev/TEMF2DO.tmp.
File system error details: Permission denied.

And after this, the Deploy process informs there is an error.

So I need to figure out why the App. Server can't open the file. I'm sure the passwords are correct, but...

Regards;
Gus
Publicado el 14,abril 2015 - 22:43
Gus,

In your /home/gus directory, try running:
chmod -R g+w ftp_webdev so then your ls -l should give you:
drwxrwsr-x 3 gus webdevadmin 4096 Jan 10 11:13 ftp_webdev Also, check your group membership in /etc/group, your gus account should be a member of webdevadmin group. For example, instead of "gus" I have an "ebusiness" user. The relevant lines from my /etc/group looks like:
ftpadmin:x:501: webdevadmin:x:502:apache,ebusiness,ftpadmin ebusiness:x:503:webdevadmin,ftpadmin So make sure webdevadmin and your ftp user are members of your group (gus), and that apache, gus, and your ftp user are members of the webdevadmin group.

This is from a Centos 6 Linux server, but should be similar for ubuntu.

...jack
Publicado el 14,abril 2015 - 22:44
Hi Gus

as I was saying, you have a problem in step 3 and it is a common permission problem when setting up a webdev server, even on windows

Best regards
Publicado el 15,abril 2015 - 05:19
Hi Jack:

I have everything the same, but it still doesn't work.

Only difference is I'm running Ubuntu in a VirtualBox with Windows as a host, but it shouldn't make any difference.

Hi Fabrice:

I setup the App. Server for Windows many times, and I don't remember of having such issues...

I will continue investigating this issue.
Thank
Gus
Publicado el 26,junio 2019 - 13:41
Did you find some solution for this error ? I have the same mistake when i try to upload my webservice in the WAS on a linux server
Publicado el 27,junio 2019 - 14:08
If you look on the French forum for WebDev, you will see that I uploaded a script that takes care of all the issues regarding installing the Application server on Linux. It works for both version 23 and 24.

It is designed to work with Debian 9. I found that the Ubuntu server had problems hosting the Application Server whereas Debian did not. I use Turnkey Linux Core running on a Vultr virtual server. The combination has proven to be stable and error free in hosting both the Application Server and HFSQL.

I also uploaded the script on the Windev user forum at https://www.wxforum.info/index.php