简体   繁体   English

Linux中NTFS分区上的Subversion(SVN)存储库?

[英]Subversion (svn) repository on NTFS partition in Linux?

Can I create and use an svn repository on an NTFS partition when working with svn in Linux? 在Linux中使用svn时,可以在NTFS分区上创建和使用svn存储库吗? That is, repository on the NTFS partition and checkouts and commits to and from an EXT4 partition. 也就是说,NTFS分区上的存储库以及EXT4分区的签出和提交。

I realize that NTFS support in Linux is limited and does not support permissions and symbolic links for example. 我意识到Linux对NTFS的支持是有限的,例如不支持权限和符号链接。 Would that, or any other limitations, cause any issues? 那或任何其他限制会引起任何问题吗?

The reason I am asking is because I am thinking about either 1) moving my repository to my Dropbox folder (which resides on an NTFS partition) or 2) moving my repository to a memory stick (which could potentially be NTFS partitioned). 我问的原因是因为我正在考虑1)将我的存储库移到我的Dropbox文件夹(位于NTFS分区上)或2)将我的存储库移到一个记忆棒上(可能是NTFS分区)。

My use case is very simple. 我的用例非常简单。 I am the only person using the repository. 我是唯一使用存储库的人。 Currently my repository resides on EXT4 and I either access it from the same machine as the repository is located on, or from a second machine thorough svn+ssh://. 当前,我的存储库位于EXT4上,我可以从与存储库所在的同一台计算机上访问它,也可以通过svn + ssh://从另一台计算机上访问它。 However, if I went with one of the options above, the access strategy would obviously change. 但是,如果我选择上述选项之一,则访问策略将明显改变。

I would be hesitant to do this because, as you stated, NTFS partitions don't support Unix style permissions. 我会犹豫不决,因为正如您所说,NTFS分区不支持Unix样式权限。

The Subversion repository directory is usually owned and can only be written to by the user who runs whatever Subversion server process is running. Subversion存储库目录通常是所有者,只能由运行任何Subversion服务器进程的用户写入。 For example, if you're using Apache httpd, and you're Apache user is called httpd , the user who owns the repository is httpd and this would be the only user with write permissions on the files and directories. 例如,如果您使用的是Apache httpd,并且您的Apache用户名为httpd ,则拥有存储库的用户为httpd ,这将是唯一对文件和目录具有写权限的用户。

A NTFS partition on a Windows box does have permissions set correctly because the Subversion server process would use Windows permission settings. Windows框上的NTFS分区的权限设置正确,因为Subversion服务器进程将使用Windows权限设置。 A Linux server will have problems. Linux服务器将出现问题。

Also NTFS partitions are case preserving and not case sensitive , I don't know how this would affect the Subversion server process running on a Linux box. 另外,NTFS分区是区分 大小写的 ,并且不区分大小写 ,我不知道这会如何影响Linux机器上运行的Subversion服务器进程。 Again, a Windows Subversion server process would be fine with this. 同样,Windows Subversion服务器进程也可以。 A Linux server may have problems. Linux服务器可能有问题。

Unfortunately, I can't say for certain one way or another. 不幸的是,我不能以某种方式说。 I've never tried it, nor seen it done. 我从来没有尝试过,也没有看到它完成。 However, there is a post on the Wandisco Forum that covers this very scenario. 但是, Wandisco论坛上有一篇帖子介绍了这种情况。 The user was able to get around his problems, but I would be hesitant to say that all is beer and candy from then on. 用户可以解决他的问题,但我会毫不犹豫地说,从那时起,一切都是啤酒和糖果。

Please say you're not doing this, so you can share a file:// protocol Subversion repository among multiple users. 请说您没有这样做,所以可以在多个用户之间共享file://协议Subversion存储库。 This is a big, fat no-no. 这是一个很大的肥胖禁忌。 Instead, you should at least run the svnserve process, and have users accessing your repository via the svn:// protocol. 相反,您至少应该运行svnserve进程,并让用户通过svn://协议访问您的存储库。 It's very simple to setup svnserve -- even as a Windows service. 设置svnserve非常简单-即使作为Windows服务也是如此。 The only problem may be that port 3620 (The Subversion server port) is being blocked by your firewall or router. 唯一的问题可能是防火墙或路由器阻止了端口3620(Subversion服务器端口)。

Dropbox multiboot ntfs folder sync. Dropbox Multiboot ntfs文件夹同步。

In an earlier closed thread by vanadium people we're wanting solution to sync Dropbox on multiple boot systems in one ntfs directory. 在钒人的早期封闭线程中,我们希望解决方案在一个ntfs目录中的多个引导系统上同步Dropbox。 Vanadium had a good suggestion that I tweaked a little bit to solve. 钒有一个很好的建议,我做了一些调整才能解决。

  1. You must install it in Windows or other system and setup Dropbox folder from Dropbox. 您必须将其安装在Windows或其他系统中,并从Dropbox设置Dropbox文件夹。
  2. Reboot into Linux system. 重新启动进入Linux系统。 (I used Ubuntu 18) (我使用Ubuntu 18)
  3. Install Dropbox to Ext 4 partition. 将Dropbox安装到Ext 4分区。
  4. Open file manager to Home folder and delete Dropbox directory. 将文件管理器打开到主文件夹,然后删除Dropbox目录。 Leave this file manager open. 将此文件管理器保持打开状态。
  5. Open a new file manager to the main directory ntfs or other that other os Dropbox folder is in. 在主目录ntfs或其他os Dropbox文件夹所在的目录中打开一个新的文件管理器。
  6. Hit ctr + h then drag the Dropbox folder to the directory you deleted it from. 按ctr + h,然后将Dropbox文件夹拖到从中删除的目录。 (This creates a symbol link shortcut to the Dropbox folder you want) (这将创建指向所需的Dropbox文件夹的符号链接快捷方式)
  7. Now sync Dropbox in Linux. 现在在Linux中同步Dropbox。
  8. If you want Dropbox to load at startup you must set the partition folder to auto mount on startup in terminal. 如果希望Dropbox在启动时加载,则必须将分区文件夹设置为在终端启动时自动挂载。

1 - Write down the UUID of the drive that you want to mount by executing the following command: 1-通过执行以下命令,记下要安装的驱动器的UUID:

sudo blkid 2 - Then edit the fstab: sudo blkid 2-然后编辑fstab:

sudo gedit /etc/fstab 3 - Add at the end of the file fstab: sudo gedit / etc / fstab 3-在文件fstab的末尾添加:

UUID=D638F77338F7514B /media/baraldi/win_www ntfs defaults 0 0 Be sure the UUID matches what you recorded in the first step UUID = D638F77338F7514B / media / baraldi / win_www ntfs默认值0 0确保UUID与第一步中记录的内容匹配

4 - Restart) 4-重新启动)

Or Use the "Disks" app. 或使用“磁盘”应用程序。

Load the Disks app (In System) and select the disk with the filesystem you want to mount on startup. 加载“磁盘”应用程序(在系统中),然后选择包含要在启动时挂载的文件系统的磁盘。

Then select the filesystem on that disk and click on the gears (for configuration). 然后选择该磁盘上的文件系统,然后单击齿轮(用于配置)。

Select "Edit Mount Options" from the popup menu. 从弹出菜单中选择“编辑安装选项”。

On the setup options, click to check the "Mount on Startup" box. 在安装选项上,单击以选中“启动时安装”框。 (This will add the entry to fstab when you click on "OK"). (当您单击“确定”时,这会将条目添加到fstab中)。

Reboot, and your filesystem should be available. 重新引导,您的文件系统应该可用。

I agree with other comments here regarding manually adding lines to fstab via CLI/text editor. 我同意此处有关通过CLI /文本编辑器手动向fstab添加行的其他评论。 If you take the time to look at your fstab file it will help you understand what changes have been made and, ultimately the CLI method will become faster for you. 如果您花时间查看fstab文件,它将有助于您了解所做的更改,最终CLI方法对您而言将变得更快。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM