崇高文本FTP - 编辑文件创建新文件

时间:2012-08-31 09:00:44

标签: ftp sublimetext editing updating

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

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

这是我的sftp pluguin配置文件(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",
}

感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

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

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