LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   File & Folder Permission and Ownership permission error in Cloud storage. (https://www.linuxquestions.org/questions/linux-newbie-8/file-and-folder-permission-and-ownership-permission-error-in-cloud-storage-4175465949/)

rhcekumaran 06-14-2013 01:28 AM

File & Folder Permission and Ownership permission error in Cloud storage.
 
Hi ,

I have configured a cloud storage in existing centos server ......

I have the fstab entry as ..

vim /etc/fstab

//503037.cloud.storage.gogrid.com/503037 /mnt/cloudstorage cifs file_mode=0666,dir_mode=0777,uid=apache,gid=apache,userid=908978,passwd=ertbghshsa;

then i have given the mount command to check the mount point its ok ..no error..

While moving the datas to the storage...using the command...

# scp -rp --preserve stgkb_1406.tgz /mnt/cloudstorage

its gives error...

cp: failed to preserve ownership for `/mnt/cloudstorage/stgkb_1406.tgz': Permission denied

even after moving the data ownership and file $ folders permission is different ...like this..

-rw------- 1 10812 bin 5.8G Jun 14 10:30 stgkb-2013.tgz


please help me how to move the data with the ownership and file or folder permission as it is...

chrism01 06-14-2013 02:50 AM

Probably because the uid/gid & user/group names are different between the systems.
More to the point, regardless of the user/group names, the files are moved by uid/gid (by num) and that name/num match probably doesn't exist identically on both systems.

rhcekumaran 06-14-2013 04:12 AM

Actually i am moving the files within the same server to additional cloud storage...which is mounted on the system.

chrism01 06-14-2013 04:41 AM

Are you using scp or cp? You show scp as a cmd, but a cp error.
If the storage is mounted within the same machine, cp should be sufficient.

Actually, looking closer, you've got a mount of type 'cifs', which would indicate MSWin (probably NTFS).
The Linux filesystems and ntfs have different ideas/concepts about 'ownerships/permissions', so this isn't unexpected.


All times are GMT -5. The time now is 05:47 AM.