FTP/ftps protocol support #4863

Closed
opened 2025-11-02 06:05:16 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @lunny on GitHub (Feb 16, 2020).

I propose that gitea could add ftp/ftps protocol support. So that you can explore files(default branch) via ftp clients and download/put/delete files.

We could implement this feature via https://goftp.io/server and I'm the author of that library. We need to implement an interface Driver via gitea.

  • Explore
  • You can login the ftp/ftps via your username/password of gitea instance.
  • When login succeed, and explore the path /, it will list all the users or orgniziations you have access permissions.
  • When enter the username/orgniziation, it will list all the repositories you have access permissions on this username/orgniziation.
  • When enter the repository, it will list the repository's first class directory of default branch. If the repository is empty, nothing will be displayed.
  • Download
  • When download from /, all repositories user have permission will be download.
  • When download from users or orgniziation directory, all repositories of this user/orgniziation will be download.
  • When download from a respository, the default branch tree files will be downloaded.
  • When download from a subtree of a repository, the sub directory will be downloaded.
  • Mkdir
  • When mkdir on /, an orgnization will be created.
  • When mkdir on a user/orgniziation, an empty repository will be created.
  • When mkdir on a repository, a directory with a empty file .gitkeep will be created and the file will be hidden from ftp view.
  • Upload
  • When upload a file on / or user/orgniziation will return error.
  • When upload a file on an empty repository, the repository will be initilized a master branch and save the file.
  • When upload a file on an exist repository, the file will be added to default branch.
  • Delete
  • / cannot be deleted
  • delete user/orgniziation direcotry, it will delete a user or an orgniziation
  • delete a file or directory on a repository, it will delete the file/directory on the repository's default branch.
Originally created by @lunny on GitHub (Feb 16, 2020). I propose that gitea could add ftp/ftps protocol support. So that you can explore files(default branch) via ftp clients and download/put/delete files. We could implement this feature via https://goftp.io/server and I'm the author of that library. We need to implement an interface Driver via gitea. * Explore - [ ] You can login the ftp/ftps via your username/password of gitea instance. - [ ] When login succeed, and explore the path `/`, it will list all the users or orgniziations you have access permissions. - [ ] When enter the username/orgniziation, it will list all the repositories you have access permissions on this username/orgniziation. - [ ] When enter the repository, it will list the repository's first class directory of default branch. If the repository is empty, nothing will be displayed. * Download - [ ] When download from `/`, all repositories user have permission will be download. - [ ] When download from users or orgniziation directory, all repositories of this user/orgniziation will be download. - [ ] When download from a respository, the default branch tree files will be downloaded. - [ ] When download from a subtree of a repository, the sub directory will be downloaded. * Mkdir - [ ] When mkdir on `/`, an orgnization will be created. - [ ] When mkdir on a user/orgniziation, an empty repository will be created. - [ ] When mkdir on a repository, a directory with a empty file `.gitkeep` will be created and the file will be hidden from ftp view. * Upload - [ ] When upload a file on `/` or user/orgniziation will return error. - [ ] When upload a file on an empty repository, the repository will be initilized a master branch and save the file. - [ ] When upload a file on an exist repository, the file will be added to default branch. * Delete - [ ] `/` cannot be deleted - [ ] delete user/orgniziation direcotry, it will delete a user or an orgniziation - [ ] delete a file or directory on a repository, it will delete the file/directory on the repository's default branch.
GiteaMirror added the reviewed/wontfix label 2025-11-02 06:05:16 -06:00
Author
Owner

@sapk commented on GitHub (Feb 17, 2020):

It could come handy but I would suggest to be separate to gitea main process like a proxy that leverage gitea api (maybe even internal api).

@sapk commented on GitHub (Feb 17, 2020): It could come handy but I would suggest to be separate to gitea main process like a proxy that leverage gitea api (maybe even internal api).
Author
Owner

@Basilakis commented on GitHub (Oct 28, 2021):

Has anyone achieved something similar?

@Basilakis commented on GitHub (Oct 28, 2021): Has anyone achieved something similar?
Author
Owner

@wxiaoguang commented on GitHub (Oct 28, 2021):

I don't think there would be enough people interested in an out-dated protocol .... FTP is too old to be used today 😂

SFTP can be better, but just as sapk said, this feature can be implemented outside Gitea, Gitea can focus on its own tasks.

@wxiaoguang commented on GitHub (Oct 28, 2021): I don't think there would be enough people interested in an out-dated protocol .... FTP is too old to be used today 😂 SFTP can be better, but just as sapk said, this feature can be implemented outside Gitea, Gitea can focus on its own tasks.
Author
Owner

@Basilakis commented on GitHub (Oct 28, 2021):

@wxiaoguang any idea how I can sftp to a branch then? :)

@Basilakis commented on GitHub (Oct 28, 2021): @wxiaoguang any idea how I can sftp to a branch then? :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4863