Commit Graph

35 Commits

Author SHA1 Message Date
Andreas Stöckel
892db7c0f2 Resolved problem with some directories that cannot be opened if they contain a symlink, due to a problem with vfs_stream_wrapper::check_symlink_components, which returned that a path doesn't have a symlink in it caused by to the vfs_stream_wrapper internal symlink_cache 2010-05-19 09:01:53 +00:00
Ralf Becker
b59a688fbb - fixed not working rename in entry directories in /apps (eg. rename of
an infolog attachment), was caused by use of url_stat from sqlfs
  instead of links stream wrapper
- fixed wrong mime type / icon in files stored via netdrive from msword
  (the first use the extension .tmp, before renaming file to .doc:
  sqlfs "detects" mime type only from the extension and did not recheck
  it if a file gets renamed, that's now fixed)
2009-12-01 14:51:13 +00:00
Ralf Becker
691cc6bb3e we need to first check if the constant is defined, as we get a fatal error in php5.3 otherwise 2009-11-30 20:29:01 +00:00
Ralf Becker
c8b795fe83 if file is moved from one filesystem / wrapper to an other --> copy it
(rename fails cross wrappers)
2009-11-28 15:23:26 +00:00
Ralf Becker
078edd98fd Fixed SQL error now giving an exception: it's caused by
vfs_stream_wrapper::get_path() returning an url without path
(sqlfs://default <-- no trailing slash), which causes
sqlfs_stream_wrapper::url_stat() to be called for an empty path, which
gives the sql error.
2009-07-01 18:03:46 +00:00
Ralf Becker
09c0854173 "$stat[url] contains the reloved symlink" 2009-05-11 20:45:29 +00:00
Ralf Becker
b296a97e31 always remove only our own scheme, as mounts require the other schemes to be kept 2009-04-30 11:21:56 +00:00
Ralf Becker
ecd9354d1d "fixed failed move or rename via WebDAV (eg. NetDrive on Windows):
trailing slashes added to all collections caused a rename to an empty filename
--> all training slashes get now removed prior to calling any backend functions"
2009-04-30 07:46:53 +00:00
Ralf Becker
6f556a23df "remove trailing slash, eg. from webdav" 2009-04-27 13:08:42 +00:00
Ralf Becker
f12a0dc307 making whole mime_magic class static, for easier use and better caching by byte code caches 2009-04-17 06:25:33 +00:00
Ralf Becker
bd8ba08bc3 allowing stream-wrappers to specify an other mime-type for directories 2009-04-08 09:54:13 +00:00
Ralf Becker
fcb8f3497c Finally fixed creation and rename of home directories:
- egw_vfs::stat and egw_vfs_stream_wrapper::url_stat now both have a
  parameter $try_create_home=false, which do not create a non-existing
  home-directory by default.
- filemanger_ui calls egw_vfs::stat($path,true) to create an evtl.
  missing home dir (in case it does not exist because of previous
  problems)
--> fixes not working home-dir creation or rename, because url_stat
    already tried to create the home-dir
2009-04-06 13:46:45 +00:00
Ralf Becker
b1f0863d81 A scheme is not allowed to contain an underscore, but allows a dot and a
class names only allow or need underscores, but no dots
--> we replace dots in scheme with underscored to get the class-name
2009-04-01 14:08:20 +00:00
Ralf Becker
637b6557fb "- symlinkCache_resolve failed on other mounted dir (eg. from the filesystem stream-wrapper), as it removed the scheme
--> now done only for vfs scheme
- quitened readlink to not complain if backend does not support links"
2009-03-31 08:43:12 +00:00
Ralf Becker
873ee33dc7 "- fixed not working symlinks to other symlinks
- added a symlink cache (only per request) to cut down db accesses"
2009-03-30 11:18:58 +00:00
Ralf Becker
881225849d "fixed not shown comments and other properties, if path contained a symlink" 2009-03-27 19:03:29 +00:00
Ralf Becker
b54d0dab25 "fixed invinit recursion (causing a segfault) when trying to create a home directory" 2009-03-27 17:39:37 +00:00
Ralf Becker
5501dd0fc3 "fixed some problem with the new symlinks (specially between different stream-wrappers) and added a permanent loggin facility" 2009-03-24 13:58:01 +00:00
Ralf Becker
55d2aaa3ee Implemented symlinks for eGW's VFS:
- sqlfs can store now symlinks (implements symlink and readlink)
- vfs resolves symlinks before calling a mounted stream-wrapper
--> symlinks can be between different mount-points
- filemanger can create symlinks and follows them
- etemplate vfs_widget displays symlinks (to be improved)
Happy testing :-)
2009-03-19 20:12:35 +00:00
Klaus Leithoff
be859fa1f6 fixing various webdav problems, regarding pathbuilding 2009-01-29 18:58:52 +00:00
Ralf Becker
2e66d3b093 "use a default for the host in resolve_url, as we otherwise get an invalid url (scheme:///path/to/something)!
"
2008-10-14 14:57:35 +00:00
Ralf Becker
0a7d4f9782 Comment and custom fields for filemanager / sqlfs 2008-10-05 17:07:36 +00:00
Ralf Becker
e76f20f665 New stream-wrapper to mount the regular filesystem into the vfs while
allowing to set an arbitrary uid, gid and mode for the vfs (like
mounting a dos Filesystem under Linux).
Can be used to mount eg. an upload dir writable only by Admins:
filemanger/cli.php mount --user root_admin --password whatever \
        filesystem://dummy/var/www/html/uploads?group=Admins&mode=075 \
        /uploads
Please note that you can NOT use filesystem:/something!
Fixed the vfs-classes to deal correctly with get-parameters used as
mount-options.
2008-09-30 11:52:56 +00:00
Ralf Becker
48352f6963 "dont return mountpoints (like eg. /apps) twice" 2008-05-10 21:47:16 +00:00
Ralf Becker
b08b584a76 silently add home dirs, if they dont exist (they get now created by a hook, when a user/group get added 2008-04-19 09:46:58 +00:00
Ralf Becker
13cf2edabb use default fstab, also for an empty one 2008-04-19 09:13:50 +00:00
Ralf Becker
501df49cbb stream wrapper interface is now eGW VFS interface
- if you already run the 1.5.003 update (AND modified anything in the VFS), you have to re-run it, to not loose your modifications or risk an inconsistent VFS (DB does not match filesystem)
- to re-run the 1.5.003 update (only if your version is already 1.5.003 or bigger!) run the following sql:
UPDATE egw_applications SET app_version=1.5.002 WHERE app_name=phpgwapi
- the new vfs supports now an extended ACL, if that is supported by the backend (sqlfs only currently)
- eacl allows to set separate recursive acl rights for different users or groups on a directory (and subdirs)
- former group grants of group dirs are converted to eacl, thought we only support read or read+write access (no extra add or delete)
- attachments via the links class now also use a stream wrapper interface (links_stream_wrapper) and WebDAV as download handler (which requires no longer filemanager run rights)
2008-04-14 05:52:24 +00:00
Ralf Becker
b98808f87f "added todo's (concept) for extended ACL, WebDAV properties and locks" 2008-03-18 13:17:13 +00:00
Ralf Becker
b638e9117b set old vfs as default again for easier testing of the new UI 2008-03-03 12:17:08 +00:00
Ralf Becker
4df4fd9f06 first work on UI for a new filemanager and some vfs bugfixes and improvments 2008-03-02 21:44:15 +00:00
Ralf Becker
3cd2ce8dd2 fixed mount command and enhanced egw_vfs::find() 2008-02-29 07:27:49 +00:00
Ralf Becker
8afe9094b7 More improvments of the sqlfs code and the command line interface:
- read rights are not checks in each traversed directory (via sql in a single query to locate the path)
- diropen additionally checks for execute rights
- fopen checks for read or write depending on the mode
- chmod, chgrp, chown methods in sqlfs and egw_vfs/vfs plus an egw_vfs::$is_root var used to grant root rights (no access controll and chown or chgrp without being the owner of a file)
- find method (some more params to come) to recursivly search and optionaly execute some callback
- egw_vfs::remove doing a "rm -r" / recursive remove or dirs and files
- new files or dirs inherit the perms and ownership from the parent directory (no umask)
- files/dirs the user has no read rights, in a directory where he has no write rights, get hidden (eg. not showing all the other users / groups home dirs
- many new cli commands (chmod, chgrp, chown, find), recursive option for most commands and the ability to use it with root rights, see the usage message if called without options
- "cp -r -p" to copy a whole tree incl. ownership and perms, eg. backing up /home to /backup
2008-02-26 08:51:42 +00:00
Ralf Becker
9c649da978 WebDAV can use now the new stream wrapper interface, thought its switched off by default in filemanager/webdav.php (see the comments at the end of the file) 2008-02-18 06:43:49 +00:00
Ralf Becker
e3ee4fb7dc new egw_vfs class, with many static methods to access the new vfs, see the documentation in the header of egw_vfs 2008-02-07 06:37:45 +00:00
Ralf Becker
e657227035 new vfs-stream-wrapper class, which uses a fstab (in a static class var at the moment) to mount different filesystems/stream-wrappers together in a single virtual file system for eGroupWare, can be tested with filemanager/ls.php and the default fstab of / => oldvfs:/ 2008-01-30 06:51:54 +00:00