PodcastGenerator / PodcastGenerator

Open Source Podcast Publishing Solution since 2006
http://www.podcastgenerator.net
GNU General Public License v3.0
584 stars 157 forks source link

Timed release might not work with FTP feature #243

Open itsckl opened 4 years ago

itsckl commented 4 years ago

System Information Podcast Generator Version: 3.01 Webserver: nginx PHP Version: 7.3

Expected behavior

I should be able to modify the publication date of upload content on my Synology box.

Actual behavior Uploading works fine, but the publication date/time cannot be changed. The reason is that podgen tries a touch() on the uploaded file. However, this fails with EACCESS cause the files are not owned by the userid the web server runs with.

Possible resolution You could instead have the new files uploaded to a separate directory (say /upload) and copy them from there during the FTP scan. This way, the files will be created by the web server userid and therefore will allow the touch() later on.

cvengler commented 4 years ago

Can you give your web server the permissions?

cvengler commented 4 years ago

I cannot reproduce this sorry

cmpilato commented 4 years ago

I agree that this isn't a PG bug, but I think it should be re-opened as a feature request. The feature is pretty straightforward -- add an optional "ftp_upload_dir" configuration option to PG. When (and only when) that option is set, PG's FTP feature would:

  1. Examine the "ftp_upload_dir" (to which PG requires but read-only access) for media files.
  2. Raise an error if any of those media files has the same name as a file in the media/ directory.
  3. Copy the media files from "ftp_upload_dir" into the media/ directory, thus assuming file ownership of (and read/write access to) those copies.
  4. ...and then continue doing all the stuff the FTP feature currently does.

With this (rather simple) feature in place, PG could be more easily used on web servers where the user is given some generic FTP access but is not given the ability to manipulate the content of the PG installation folder. In other words, with this feature, we go a long way toward making PG suitable as a "1-click install" type of package that web hosting providers such as DreamHost (and many others) could offer to their users.

cvengler commented 4 years ago

Ok, will reopen then. I was just working on fixing the bugs and closing the non bug issues as the next release is coming soon