emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* mobile org problems
@ 2011-03-01 22:22 Richard Riley
  2011-03-02 13:09 ` Richard Riley
  2011-03-02 16:04 ` Greg Troxel
  0 siblings, 2 replies; 7+ messages in thread
From: Richard Riley @ 2011-03-01 22:22 UTC (permalink / raw)
  To: Emacs-orgmode mailing list


I am using an scpc tramp url for my moble org directory. When I do a
mobile push, why does emacs or mobileorg keep asking me for to select
coding system (default raw)? Also, why does it delete/chmod the
mobileorg.org file on my webdav server? After the initial push/pull the
next push then fails after I sync from my iphone - the iPhone uses
webdav to connect which recreate mobileorg.org(or any org files) with
permissions 640 and owned by www-data and not my user - the www-data
group cant write to it next time I try to push.

Any pointers or commenst from other mobileorg/webdav users appreciated.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mobile org problems
  2011-03-01 22:22 mobile org problems Richard Riley
@ 2011-03-02 13:09 ` Richard Riley
  2011-03-02 16:04 ` Greg Troxel
  1 sibling, 0 replies; 7+ messages in thread
From: Richard Riley @ 2011-03-02 13:09 UTC (permalink / raw)
  To: emacs-orgmode

Richard Riley <rileyrg@googlemail.com> writes:

> I am using an scpc tramp url for my moble org directory. When I do a
> mobile push, why does emacs or mobileorg keep asking me for to select
> coding system (default raw)? Also, why does it delete/chmod the
> mobileorg.org file on my webdav server? After the initial push/pull the
> next push then fails after I sync from my iphone - the iPhone uses
> webdav to connect which recreate mobileorg.org(or any org files) with
> permissions 640 and owned by www-data and not my user - the www-data
> group cant write to it next time I try to push.
>
> Any pointers or commenst from other mobileorg/webdav users appreciated.
>

Or to ask another way, is anyone successfully using mobileorg with
iPhone using webdav on a regular basis and if so could you share your
setup please.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mobile org problems
  2011-03-01 22:22 mobile org problems Richard Riley
  2011-03-02 13:09 ` Richard Riley
@ 2011-03-02 16:04 ` Greg Troxel
  2011-03-02 16:08   ` Greg Troxel
  2011-03-02 16:08   ` Richard Riley
  1 sibling, 2 replies; 7+ messages in thread
From: Greg Troxel @ 2011-03-02 16:04 UTC (permalink / raw)
  To: Richard Riley; +Cc: Emacs-orgmode mailing list


[-- Attachment #1.1: Type: text/plain, Size: 1154 bytes --]


I use MobileOrg with webdav, both remote over ssh/tramp, and locally
(two separate setups).

On the ssh one:

(setq org-mobile-directory "/ssh:foo.example.org:/usr/home/gdt/ORG")
(setq org-mobile-inbox-for-pull
      (concat org-directory "/from-mobile.org"))
(setq org-mobile-use-encryption t)
(setq org-mobile-encryption-password "password")

But, the tricky part is dealing with permissions.

Basically, the webdav world seems to want you to only access it via
webdav, and joint filesystem and webdav access is troublesome.

My remote directory is (on NetBSD, which I think inherits gid even
without the SysV-style sgid directory):

drwxrws---  2 gdt  www  512 Mar  2 09:08 ORG/

and I run this script from cron every 5 minutes:

#!/bin/sh
cd /home/gdt/ORG

find . -type f \! -group www | while read f; do
    echo -n "GROUP "; ls -l $f
    chgrp www $f
done
find . -type f -name mobileorg\* \! -perm -220 | while read f; do
    echo -n "MODE "; ls -l $f
    chmod g+w $f
done



An alternative would be to have a webdav fs on the machine with the org
files, and to use that to write to the webdav area.

My webdav setup is straightforward apache.



[-- Attachment #1.2: Type: application/pgp-signature, Size: 194 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mobile org problems
  2011-03-02 16:04 ` Greg Troxel
@ 2011-03-02 16:08   ` Greg Troxel
  2011-03-02 16:08   ` Richard Riley
  1 sibling, 0 replies; 7+ messages in thread
From: Greg Troxel @ 2011-03-02 16:08 UTC (permalink / raw)
  To: Richard Riley; +Cc: Emacs-orgmode mailing list


[-- Attachment #1.1: Type: text/plain, Size: 372 bytes --]


I should have pointed out the causes of the two problems the script
resolves:

  ssh tramp at least sometimes preserves gid, and the gid on my org
  machine is an allowed gid on the webdav server, so files can end up
  with my normal gid instead of www.

  when mobileorg.org is rewritten by org (after pull), it ends up 644
  gdt.www, but then MobileOrg can't write it.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 194 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mobile org problems
  2011-03-02 16:04 ` Greg Troxel
  2011-03-02 16:08   ` Greg Troxel
@ 2011-03-02 16:08   ` Richard Riley
  2011-03-02 16:10     ` Greg Troxel
  2011-03-02 16:10     ` Greg Troxel
  1 sibling, 2 replies; 7+ messages in thread
From: Richard Riley @ 2011-03-02 16:08 UTC (permalink / raw)
  To: Greg Troxel; +Cc: Emacs-orgmode mailing list

Greg Troxel <gdt@ir.bbn.com> writes:

> I use MobileOrg with webdav, both remote over ssh/tramp, and locally
> (two separate setups).
>
> On the ssh one:
>
> (setq org-mobile-directory "/ssh:foo.example.org:/usr/home/gdt/ORG")
> (setq org-mobile-inbox-for-pull
>       (concat org-directory "/from-mobile.org"))
> (setq org-mobile-use-encryption t)
> (setq org-mobile-encryption-password "password")
>
> But, the tricky part is dealing with permissions.
>
> Basically, the webdav world seems to want you to only access it via
> webdav, and joint filesystem and webdav access is troublesome.
>

Yup. This was my issue too.

> My remote directory is (on NetBSD, which I think inherits gid even
> without the SysV-style sgid directory):
>
> drwxrws---  2 gdt  www  512 Mar  2 09:08 ORG/
>
> and I run this script from cron every 5 minutes:
>
> #!/bin/sh
> cd /home/gdt/ORG
>
> find . -type f \! -group www | while read f; do
>     echo -n "GROUP "; ls -l $f
>     chgrp www $f
> done
> find . -type f -name mobileorg\* \! -perm -220 | while read f; do
>     echo -n "MODE "; ls -l $f
>     chmod g+w $f
> done

Aha. I didnt think it could work "out of the box". Thanks for the
confirmation.

>
> An alternative would be to have a webdav fs on the machine with the org
> files, and to use that to write to the webdav area.
>

I'm not sure I parse that properly. Do you mean mounted and owned as
www-data/www via shfs or something?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mobile org problems
  2011-03-02 16:08   ` Richard Riley
@ 2011-03-02 16:10     ` Greg Troxel
  2011-03-02 16:10     ` Greg Troxel
  1 sibling, 0 replies; 7+ messages in thread
From: Greg Troxel @ 2011-03-02 16:10 UTC (permalink / raw)
  To: Richard Riley; +Cc: Emacs-orgmode mailing list


[-- Attachment #1.1: Type: text/plain, Size: 529 bytes --]


Richard Riley <rileyrg@googlemail.com> writes:

> Greg Troxel <gdt@ir.bbn.com> writes:
>
>> An alternative would be to have a webdav fs on the machine with the org
>> files, and to use that to write to the webdav area.
>>
>
> I'm not sure I parse that properly. Do you mean mounted and owned as
> www-data/www via shfs or something?

I mean use a fuse weddav mount with the same credentials, so that when
emacs puts org files there, it uses the same access/permissions/owners
on the filesystem that is backing the webdav space.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 194 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mobile org problems
  2011-03-02 16:08   ` Richard Riley
  2011-03-02 16:10     ` Greg Troxel
@ 2011-03-02 16:10     ` Greg Troxel
  1 sibling, 0 replies; 7+ messages in thread
From: Greg Troxel @ 2011-03-02 16:10 UTC (permalink / raw)
  To: Richard Riley; +Cc: Emacs-orgmode mailing list


[-- Attachment #1.1: Type: text/plain, Size: 529 bytes --]


Richard Riley <rileyrg@googlemail.com> writes:

> Greg Troxel <gdt@ir.bbn.com> writes:
>
>> An alternative would be to have a webdav fs on the machine with the org
>> files, and to use that to write to the webdav area.
>>
>
> I'm not sure I parse that properly. Do you mean mounted and owned as
> www-data/www via shfs or something?

I mean use a fuse weddav mount with the same credentials, so that when
emacs puts org files there, it uses the same access/permissions/owners
on the filesystem that is backing the webdav space.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 194 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-03-02 16:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-01 22:22 mobile org problems Richard Riley
2011-03-02 13:09 ` Richard Riley
2011-03-02 16:04 ` Greg Troxel
2011-03-02 16:08   ` Greg Troxel
2011-03-02 16:08   ` Richard Riley
2011-03-02 16:10     ` Greg Troxel
2011-03-02 16:10     ` Greg Troxel

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).