【问题标题】:sublime text FTP - Editing file creates new onesublime text FTP - 编辑文件创建新文件
【发布时间】:2012-08-31 09:00:43
【问题描述】:

我最近安装了 sublime text 2 插件“SFTP”来直接处理我的 ftp 服务器文件。 它正确连接到我的 ftp 服务器,但是当我上传/保存文件时(为了保存对原始文件的编辑)它不会覆盖保存更新的原始文件,而是在我的 ftp 中创建一个新文件文件夹:如果我在保存时编辑“index.php”,崇高文本会创建一个新文件“index.php.1”并且原始 index.php 保持未更新。

我坚持认为这可能是权限问题,但在我的服务器上,所有用户的文件夹都具有 777 权限,并且文件也获得了 777 权限。

这是我的 sftp 插件配置文件 (sftp-config.json):

{
// The tab key will cycle through the settings when first created
// Visit http://wbond.net/sublime_packages/sftp/settings for help

// sftp, ftp or ftps
"type": "ftp",

"save_before_upload": true,
"upload_on_save": true,
"sync_down_on_open": true,
"sync_skip_deletes": false,
"confirm_downloads": false,
"confirm_sync": true,
"confirm_overwrite_newer": false,

"host": "mobility.unixdata.es",
"user": "admin",
"password": "mlcud",
//"port": "22",

"remote_path": "/Escriptori/htdocs/betamobility/testing",
"ignore_regexes": [
    "\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",
    "sftp-settings\\.json", "/venv/", "\\.svn", "\\.hg", "\\.git",
    "\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini"
],
"file_permissions": "777",
"dir_permissions": "777",

//"extra_list_connections": 0,

"connect_timeout": 30,
//"keepalive": 120,
//"ftp_passive_mode": true,
//"ssh_key_file": "~/.ssh/id_rsa",
//"sftp_flags": ["-F", "/path/to/ssh_config"],

//"preserve_modification_times": false,
//"remote_time_offset_in_hours": 0,
//"remote_encoding": "utf-8",
//"remote_locale": "C",
}

感谢您的帮助!!

【问题讨论】:

  • 你试过在 Sublime Text 论坛上问这个吗?

标签: ftp sublimetext editing updating


【解决方案1】:

这很可能是由于 FTP 服务器的设置造成的。有关类似问题的答案,请参阅 https://superuser.com/questions/333022/ftp-upload-overwrite-does-not-overwite-but-creates-file-ext-instead

如果您通过公共网络传输文件,我建议您使用 SFTP 而不是 FTP。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-07-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多