Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on ntfs partition. #35

Open
kwon37xi opened this issue Oct 12, 2015 · 4 comments
Open

Error on ntfs partition. #35

kwon37xi opened this issue Oct 12, 2015 · 4 comments

Comments

@kwon37xi
Copy link

When I tried to sync my google drive on a ntfs partition, the following error occured.
After changing to ext4, no error occurs.

sync "./icons/myicon.png" created in remote. creating local
exception: /build/grive2-rauZp1/grive2-0.4.1/libgrive/src/util/OS.cc(81): Throw in function void gr::os::SetFileTime(const string&, const gr::DateTime&)
Dynamic exception type: boost::exception_detail::clone_impl<gr::os::Error>
[gr::expt::BacktraceTag*] = #0 0x477d00 grive gr::Exception::Exception()
#1 0x477151 grive gr::os::Error::Error()
#2 0x476e12 grive gr::os::SetFileTime(boost::filesystem::path const&, gr::DateTime const&)
#3 0x44d5ff grive gr::Syncer::Download(gr::Resource*, boost::filesystem::path const&)
#4 0x449df8 grive gr::Resource::SyncSelf(gr::Syncer*, gr::Val const&)
#5 0x44a237 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#6 0x44a358 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#7 0x44a358 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#8 0x44e5c8 grive gr::State::Sync(gr::Syncer*, gr::Val const&)
#9 0x443066 grive gr::Drive::Update()
#10 0x432cce grive Main(int, char**)
#11 0x430cab grive main
#12 0x7f2e724d1ec5 /lib/x86_64-linux-gnu/libc.so.6 __libc_start_main
#13 0x43181f grive 

1, "Operation not permitted"[boost::errinfo_file_name_*] = ./icons/myicon.png
[boost::errinfo_api_function_*] = utimes
@vitalif
Copy link
Owner

vitalif commented Oct 12, 2015

The fix for this should be very simple (do not throw exception when mtime change fails), but it's interesting that your ntfs volume does not allow changing mtime. Is it ntfs-3g?

@vitalif
Copy link
Owner

vitalif commented Oct 12, 2015

Just tested with ntfs-3g - there is no such error...

@kwon37xi
Copy link
Author

I tried again and I found the solution.
After adding fmask,uid to /etc/fstab item, it works correctly.

Before my /etc/fstab

UUID=0226D37B26D36E63 /media/windows  ntfs    defaults,umask=007,gid=46 0       0

After

UUID=0226D37B26D36E63 /media/windows  ntfs    defaults,umask=007,gid=46,fmask=111,uid=1000 0       0

@vitalif
Copy link
Owner

vitalif commented Oct 13, 2015

Ok, so you weren't the owner of these files.
I think I'll remove the exception anyway because the mtime modifications are not necessary for grive to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants