mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-10-11 03:23:17 +00:00
fix typos, add info about davfs2
This commit is contained in:
parent
0b4b3fb9d9
commit
1bd5c9e3e4
|
@ -13,17 +13,45 @@ and its content, while a file system knows just files.
|
||||||
In SeedDMS a document is uniquely identified
|
In SeedDMS a document is uniquely identified
|
||||||
by its document id and not neccessarily by its name. A filesystem
|
by its document id and not neccessarily by its name. A filesystem
|
||||||
requires a unique paths for each file. Two identical files in the
|
requires a unique paths for each file. Two identical files in the
|
||||||
same folder are not possible. SeedDMS can handle identifcally named
|
same folder are not possible. SeedDMS can handle identically named
|
||||||
documents in one folder. In order to prevent any problems arising from
|
documents in one folder. In order to prevent any problems arising from
|
||||||
this, you should always disallow identical document names in the
|
this, you should always disallow identical document names in the
|
||||||
settings. By definition a file in WebDAV is mapped on the latest
|
settings. By definition a file in WebDAV is mapped on the latest
|
||||||
version of a document in SeedDMS. There is no way to access previous
|
version of a document in SeedDMS. There is no way to access previous
|
||||||
versions of a document via WebDAV. Whenever you modify a file,
|
versions of a document via WebDAV. Whenever you modify a file and
|
||||||
|
upload it with the web gui,
|
||||||
a new version will be created. Unfortunately, this has some very
|
a new version will be created. Unfortunately, this has some very
|
||||||
nasty side effects when you often save a file, because any save
|
nasty side effects when you edit a document version via WebDAV and
|
||||||
operation will create a new version. This is because the WebDAV
|
often save it, because any save
|
||||||
server replaces the content of document instead of creating a new
|
operation will create a new version. This is why the WebDAV
|
||||||
version if a document is saved again.
|
server has a configuration option which allows to either replace
|
||||||
|
the content of document or creating a new
|
||||||
|
version if a document is saved.
|
||||||
|
|
||||||
|
Configuring davfs2
|
||||||
|
===================
|
||||||
|
|
||||||
|
On Linux it is quite simple to mount the SeedDMS WebDAV server with
|
||||||
|
davfs2. Just place a line like the following in your /etc/fstab
|
||||||
|
|
||||||
|
http://seeddms.your-domain.com/webdav/index.php /media/webdav davfs noauto,user,rw,uid=1000,gid=1000
|
||||||
|
|
||||||
|
and mount it as root with
|
||||||
|
|
||||||
|
mount /media/webdav davfs
|
||||||
|
|
||||||
|
You may as well want to configure davfs2 in /etc/davfs2/davfs2.conf by setting
|
||||||
|
|
||||||
|
[/media/webdav]
|
||||||
|
use_locks 0
|
||||||
|
gui_optimize 1
|
||||||
|
|
||||||
|
and possibly add your login data to /etc/davfs2/secrets
|
||||||
|
|
||||||
|
/media/webdav admin secret
|
||||||
|
|
||||||
|
Making applications work with WebDAV
|
||||||
|
=====================================
|
||||||
|
|
||||||
Various programms have differnt strategies to save files to disk and
|
Various programms have differnt strategies to save files to disk and
|
||||||
prevent data lost under all circumstances. Those strategies often don't
|
prevent data lost under all circumstances. Those strategies often don't
|
||||||
|
@ -35,19 +63,31 @@ VIM
|
||||||
|
|
||||||
vim does a lot more than just reading and writing the file you want
|
vim does a lot more than just reading and writing the file you want
|
||||||
to edit. It creates swap and backup files for data recovery if vim crashes
|
to edit. It creates swap and backup files for data recovery if vim crashes
|
||||||
or is being kill unexpectivly. On a low bandwidth connection this can
|
or is being killed unexpectively. On a low bandwidth connection this can
|
||||||
slow down the editing. For that reason you should either not create the
|
slow down the editing. For that reason you should either not create the
|
||||||
swap file at all or create it outside the WebDAV server. A second problem
|
swap file at all or create it outside the WebDAV server. A second problem
|
||||||
arises from how vim modifіes the file you are editing. Before a file
|
arises from how vim modifіes the file you are editing. Before a file
|
||||||
is saved a backup is created and the new content is written into a new
|
is saved a backup is created by renaming the file to the same name with a
|
||||||
file with the name of the original file. On a file system you
|
'~' at the end and writing the file content into a new
|
||||||
won't see a difference between the file before and after saveing, though
|
file with the name of the original file. Afterwards vim deleteѕ the backup
|
||||||
is actually a new one. In SeedDMS you won't notice a difference either
|
file. On a regular file system you
|
||||||
if just looking at the document name. It's still the same, but the
|
won't see a difference between the file before and after saving, though
|
||||||
|
it is actually a new one. In SeedDMS you won't notice a difference either
|
||||||
|
by just looking at the document name. It's still the same, but the
|
||||||
document id has changed. So saving a document will delete the
|
document id has changed. So saving a document will delete the
|
||||||
old document and create a new one instead of creating a new version of
|
old document and create a new one instead of creating a new version of
|
||||||
the old document. If you don't want this behaviour, then tell vim
|
the old document. If you don't want this behaviour, then tell vim
|
||||||
to not create the backup. Creating the backup file in a directory
|
to not create the backup file. You can do that by either passing additional
|
||||||
outside of WebDAV doesn't help in this case.
|
parameters to vim
|
||||||
|
|
||||||
vi "+set nobackup" "+set nobackuwrite" -n test.txt
|
vi "+set nobackup" "+set nowritebackup" -n test.txt
|
||||||
|
|
||||||
|
or by setting them in your .vimrc
|
||||||
|
|
||||||
|
set nobackup
|
||||||
|
set nowritebackup
|
||||||
|
set noswapfile
|
||||||
|
|
||||||
|
Creating the backup file in a directory outside of WebDAV doesn't help in
|
||||||
|
this case, because it still does the file renaming which is turned of by
|
||||||
|
'nowritebackup'.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user