Linux script to create weblinks
Posted: Sat Oct 27, 2018 4:55 pm
Hi! I am trying to AUTOMATICALLY create weblinks / download URLs on our Linux system via a shell script. I need this to be non-manual / fully automatic. Here is what I am doing:
1. I create a random 32 character weblink filename (using characters a-f and 0-9 to match the current format) in the ~/wftpserver/Data/_WEBLINK directory
2. I populate the new weblink file with just three lines:
$FULLPATH/$FILENAME
-1
-2040421925
3. I then create the download URL in the following format:
https://$OURDOMAIN/main.html?download&weblink=$WEBLINKFILENAME&realfilename=$FILENAME" rel="nofollow
(Where the capitalized $ values are our specific values)
All of the permissions & ownerships match those created manually via the web interface.
However, my my process isn't working. I get a "No webpage was found for the web address" / 404 error on the links that I create.
From what I can tell, my process is doing what the web interface process is doing... or is there something else that needs to be done to get the weblinks to work?
Thank you very much!!
1. I create a random 32 character weblink filename (using characters a-f and 0-9 to match the current format) in the ~/wftpserver/Data/_WEBLINK directory
2. I populate the new weblink file with just three lines:
$FULLPATH/$FILENAME
-1
-2040421925
3. I then create the download URL in the following format:
https://$OURDOMAIN/main.html?download&weblink=$WEBLINKFILENAME&realfilename=$FILENAME" rel="nofollow
(Where the capitalized $ values are our specific values)
All of the permissions & ownerships match those created manually via the web interface.
However, my my process isn't working. I get a "No webpage was found for the web address" / 404 error on the links that I create.
From what I can tell, my process is doing what the web interface process is doing... or is there something else that needs to be done to get the weblinks to work?
Thank you very much!!