Avatar of ArneIT
ArneIT
 asked on

How to write as a root to external storage

Hello Everyone,

Let me explain my situation. I have bought WD Storage 2TB, and i created user in it to connect from another server,

I have mounted it to my server,
//0.0.0.0/external /backup cifs username=xxx,password=xxxx 0 0  there is no problem..

The problem is files owner is not root, different numbers like 98 1000 or something..

How can i mount this external disk to write in it as a root. Because i need to write in it as a root.

Is there any suggestion?


Storage SoftwareRemote AccessLinux Networking

Avatar of undefined
Last Comment
ArneIT

8/22/2022 - Mon
TRW-Consulting

Where you have "username=xxx,password=xxxx", change that to "username=xxx,password=xxxx,uid=0,gid=0"

The problem with CIFS is that it's being logged into as a certain user (username/password), so all file/directory ownerships are actually by that username.  Adding the "uid=0,gid=0" option makes it appear as if the owner/group is root/root.

It would be much better if they had the option of using NFS, then you could have real multi-user ownership instead of the limits SMB puts on it.
ArneIT

ASKER
Hi TRW-Consulting,

Thanks for your help, and yes i can do that with NFS but how?
ArneIT

ASKER
I have tried to mount with NFS,
0.0.0.0:/shares/SRV9         /backup                 nfs     defaults        0 0

It didnt worked out, getting this error.

mount: 95.0.197.6:/shares/SRV9 failed, reason given by server: Permission denied

Can you help me what should i do on WD Storage Side?

thanks
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ASKER CERTIFIED SOLUTION
TRW-Consulting

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ArneIT

ASKER
thanks