Giter Site home page Giter Site logo

Smb/cifs mount permission issue. about osync HOT 11 CLOSED

deajan avatar deajan commented on May 18, 2024
Smb/cifs mount permission issue.

from osync.

Comments (11)

deajan avatar deajan commented on May 18, 2024

I'm not sure if this is and osync bug or something between your configuration and rsync, and the logs won't be sufficient here.

Have you tried to set times and permissions on the files manually as the user running osync ?
If you cannot find the issue, can i get temporary access to that server to have some tests ?

from osync.

dcmwai avatar dcmwai commented on May 18, 2024

I think that you cannot change the permission or xattr on that drive.
Can we somehow ignore the permission and also xattr?

I've partial debug log here.
https://gist.github.com/dcmwai/fe41361ccbb7ca783c49

not sure if that is helpful...

from osync.

deajan avatar deajan commented on May 18, 2024

Your last gist showed that you already disabled ACL and XATTR copy in configs.
But you MUST have the rights to change at least timestamps, which it seems you don't have either.
You must find where your problem lies, this isn't osync related think.

Have you tried to test changing perms as root ? If yes, grant your current user more rights on the folder / share via samba.
I think I've read your samba share is on ZFS, have you set xattr=sa ?

from osync.

dcmwai avatar dcmwai commented on May 18, 2024

This is more complicated than I though...

This is related to:
owner
group
permission
dir time

local (ocfs2) ---> Remote (smb)
Limitation:
Smb don't take owner, group and permission
(Root)So when copy from local to remote, we cannot have owner group and permission set
--no-perms --no-owner --no-group
(User) don't have permission to change directory time
--omit-dir-times

local (ocfs2) <--- Remote (smb)
Limitation:
(Root)So when copy from local to remote, we need to have owner group and permission set
Without owner group and permission the files will belong to root and no on will be able to read it...

(User) don't have permission to change directory time
--omit-dir-times

I think we might have to define extra permission according to slave type...
Which is going complicated...

from osync.

dcmwai avatar dcmwai commented on May 18, 2024

I've make an ugly patch.
I don't like it much.

I think you have a better way to do it.

from osync.

deajan avatar deajan commented on May 18, 2024

Usually smb allows setting owner, perms and timestamps, especially if you told me it works as root.
You should maybe check your permissions in smb.conf for that user.

Not using timestamps is a major drawback because rsync relies on timestamps to know which file is newer, this is definitly not the good way of doing.

from osync.

deajan avatar deajan commented on May 18, 2024

While it's not the best solution, why don't you run osync with sudo privileges, or even as root ?
See the documentation http://netpower.fr/projects/osync/osync_0.99RC4.html#toc-Subsection-2.3 , you may run osync as a standard user and allow this user to sudo certain commands like rsync.
This way, osync is basically run as your sync user but rsync has full root privleges.

from osync.

dcmwai avatar dcmwai commented on May 18, 2024

Let me think again.
I need check where the limitation is...
When doing smb mount, there are some limit...

from osync.

deajan avatar deajan commented on May 18, 2024

Any updates ?
Btw, is there a way to get an RW access to that wiki so i can update some details ?

from osync.

dcmwai avatar dcmwai commented on May 18, 2024

I switch that to dfs without sync...
I think there are some strange factor here..

  1. I'm runnig the script as users and cause changing the directory creation time error (users in linux cannot change time unless it is sudo)
  2. Because I mount the cifs as user A, the nas don't allow this user A sync or add other users access in the files/folder...

Under the above 2 restriction... (I think...)
we have to run it as root and a cifs users which have the access to change the cifs ACL.
But that it come another problem... The NAS and linux server don't have same uid/gid (because of how the nas handle it UID/GID) so that why I drop this idea and go to dfs...

Thank you for the help

P.s I still think it is good to have ignore users and group permission on the script.
But it is missing a feature on if running the osync as root, who files it should be after sync to local...

Thank again.

from osync.

deajan avatar deajan commented on May 18, 2024

Well, thank you for your explanation.
There are things i don't understand like why do you sync to a NAS ?

Also, why don't you use osync the way it's designed, sync over ssh instead of over smb ?

Anyway, wish you good luck with your case.

As for the user / group permissions, not syncing them would be a great drawback for a sync software. What's your point ? If you cannot sync permissions, you cannot sync time changes which is needed for sync software.

from osync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.