Support Files From Other Filesystem

Get help from the community here.

Moderator: Developers

guywithcable
Posts: 7
Joined: Wed Jul 01, 2009 5:52 pm

Support Files From Other Filesystem

Postby guywithcable » Wed Jul 01, 2009 6:07 pm

Hi all. This is my first time getting on the forum. I've installed Group-Office on a test server to see if it could support everything we need in our office. I'm a PHP programmer, so don't hesitate to tell me to dive into the code myself, I know I'll be doing that soon anyway. xD

So here's my question:
Is it possible to have a folder in the files module that contains an FTP (or Samba) mount? In other words, we have an FTP/SMB server here, and everyone currently uses it to exchange files. We want to keep as much backward compatibility as possible during our transition from Outlook to Group-Office, so we need support for that server in Group-Office. There are several ways I can see that this could work. Does Group-Office support mounting an FTP share on its own? Can Group-Office be set up to use files on the filesystem that weren't uploaded through its interface? I can see the Group-Office keeps metadata about files in the database, but is it possible to use files without this metadata? Is it possible to set up a hook to the filesystem that will notify Group-Office when files are changed, so it can update its metadata?

If this can't be done yet, I'll post in the feature request forum, and try to write some code myself.

Thanks for any help, and thanks to the Group-Office devs for making such a slick system!
mschering
Site Admin
Site Admin
Posts: 8154
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: Support Files From Other Filesystem

Postby mschering » Thu Jul 02, 2009 6:47 am

You can mount the samba share in the admin user folder of group-office. then share that folder in Group-Office with other users. You need to click at refresh in GO to make GO read the changes on the filesystem after the mount.
Best regards,

Merijn Schering
Intermesh
Papageno
Posts: 58
Joined: Tue Jun 30, 2009 9:18 am

Re: Support Files From Other Filesystem

Postby Papageno » Thu Jul 02, 2009 8:14 pm

The samba configuration section for the folder should look like this:

Code: Select all

[Projects_in_GO]
   comment = Access to all projects from Windows etc.
   path = /.../groupoffice/projects
   force user = www-data
   read only = No
   locking = No


But I am not sure if this is the best solution.

The user must be in the group www-data and added to samba. Follow these steps:

adduser XXXXX
adduser XXXXX www-data
smbpasswd XXXXX

/etc/init.d/samba restart

Now, the folder should be reachable.

If anyone has a better solution, please add it. :wink:
mschering
Site Admin
Site Admin
Posts: 8154
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: Support Files From Other Filesystem

Postby mschering » Fri Jul 03, 2009 7:33 am

Yes that should work. You can also make GO use different permissions with $config['folder_create_mode'] and file_create_mode.
Best regards,



Merijn Schering

Intermesh
guywithcable
Posts: 7
Joined: Wed Jul 01, 2009 5:52 pm

Re: Support Files From Other Filesystem

Postby guywithcable » Fri Jul 03, 2009 4:01 pm

Where do I mount the share so that it shows up in the files module?

Edit: Never mind, I was in the wrong folder. It has to be in the GO data folder under "users/admin".
Papageno
Posts: 58
Joined: Tue Jun 30, 2009 9:18 am

Re: Support Files From Other Filesystem

Postby Papageno » Fri Jul 03, 2009 4:07 pm

You can not mount files inside GO. Either you mount them on OS - Level with ln -s ... or you use the folders from GO and share them via samba or NFS.
Would you like to use different folders inside GO or would you like to access the GO files (or both :P )

Best Regards
Hans
guywithcable
Posts: 7
Joined: Wed Jul 01, 2009 5:52 pm

Re: Support Files From Other Filesystem

Postby guywithcable » Fri Jul 03, 2009 4:36 pm

Works like a charm. :D Just remember to give it the right permissions/owner. So, if your SMB user is "hunter" and Apache is running as "www-data" (the default in Ubuntu), mount it like this from a terminal:

Code: Select all

sudo mount -t smbfs -o username=hunter,password=********,uid=www-data,gid=www-data //fileserve/data /home/groupoffice/users/admin/fileserve


or like this in /etc/fstab:

Code: Select all

//fileserve/data   /home/groupoffice/users/admin/fileserve   smbfs   username=hunter,password=********,uid=www-data,gid=www-data   0   0


And you first have to make the mount point like this:

Code: Select all

sudo su -s /bin/bash www-data
mkdir /home/groupoffice/users/admin/fileserve
don
Posts: 148
Joined: Thu Mar 12, 2009 12:38 pm

Re: Support Files From Other Filesystem

Postby don » Tue Jul 31, 2012 7:01 am

We had some problems in upgrading to te latest version, since the installation script set up a chown or chmod command, which is not allowed for a foreign system root user.

We had to append the /etc/exports file for future releases with a no_root_squash:

/home/groupoffice remote-server(rw,async,no_root_squash)


Now foreign root can change permissions of a file.
Best regards,
Don
mschering
Site Admin
Site Admin
Posts: 8154
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: Support Files From Other Filesystem

Postby mschering » Thu Aug 02, 2012 9:20 am

The package should work without that now too but it's better to set it anyway.
Best regards,



Merijn Schering

Intermesh

Return to “General help”

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron