abeesam
1 Copper

Please help. I am trying to restore a file from the snapshot. I am running into permission issue.

Jump to solution


is4-1$ ls -ltr /ifs/is4/HDFS/elz_uat/tmp/test
total 30
drwxr-xr-x    2 gpadmin  hadoop  26 Nov 20 09:04 d1
drwxr-xr-x    2 gpadmin  hadoop  27 Nov 20 09:04 d2
-rw-r--r--    1 gpadmin  hadoop   6 Nov 20 09:04 test2.csv
is4-1$ isi snapshot snapshots create snap_temp_d1_25nov /ifs/is4/HDFS/elz_uat/tmp/test/d1
is4-1$ isi snapshot snapshots view snap_temp_d1_25nov
          ID: 47215
        Name: snap_temp_d1_25nov
        Path: /ifs/is4/HDFS/elz_uat/tmp/test/d1
   Has Locks: No
    Schedule: -
       Alias: -
     Created: 2014-11-25T15:16:37
     Expires: -
        Size: 0b
Shadow Bytes: 0b
   % Reserve: 0.00%
% Filesystem: 0.00%
       State: active

---

is4-1$ isi auth id
Ids
-------------------------------------------------------------------
ID Type          ID                                               
-------------------------------------------------------------------
UID              UID:54545                                        
User SID         SID:S-1-5-21-4237034972-1548648221-2056507326-1014
GID              GID:54544                                        
Group SID        SID:S-1-5-21-4237034972-1548648221-2056507326-1008
On Disk User ID  UID:54545                                        
On Disk Group ID GID:54544                                        
Additional ID    SID:S-1-5-11                                     
-------------------------------------------------------------------
Total: 7

Privileges
--------------------------------------
ID                 Name     Access   
--------------------------------------
ISI_PRIV_LOGIN_SSH SSH      Read only
ISI_PRIV_SNAPSHOT  Snapshot Read/write
ISI_PRIV_SYNCIQ    SyncIQ   Read/write
--------------------------------------
Total: 1

Zone Information
----------------------------------------------------------------------
Zone ID  ZID  Protocol  Local Address  Remote Address  Ifs Restricted
----------------------------------------------------------------------
System   1    17        10.171.234.128 10.171.234.25   False         
----------------------------------------------------------------------


is4-1$ ls /ifs/.snapshot/snap_temp_d1_25nov
ls: /ifs/.snapshot/snap_temp_d1_25nov: Permission denied
is4-1$ cp /ifs/.snapshot/snap_temp_d1_25nov /ifs/is4/HDFS/elz_uat/tmp/test/d2
cp: /ifs/.snapshot/snap_temp_d1_25nov: Permission denied

Labels (2)
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
peglarr
2 Iron

Re: Please help. I am trying to restore a file from the snapshot. I am running into permission issue.

Jump to solution

You should restore the file by copying it not from /ifs/.snapshot but from the original directory in its .snapshot directory.

This should resolve the permissions issue;  Adam is correct, /ifs/.snapshot is owned by root whereas the directory

/ifs/is4/HDFS/elz_uat/tmp/test/d1/.snapshot


should have the same permissions as the parent d1 directory.


To verify, cd to /ifs/is4/HDFS/elz_uat/tmp/test/d1/.snapshot and have a look.  You should see a directory called snap_temp_d1_25nov in there, and the files in that directory.  cp the file of concern from there to wherever you like.


cheers

Rob


0 Kudos
3 Replies
abeesam
1 Copper

Re: Please help. I am trying to restore a file from the snapshot. I am running into permission issue.

Jump to solution

Directory( /ifs/.snapshot/) where snapshot getting created is owned by root.

0 Kudos
AdamFox
3 Argentium

Re: Please help. I am trying to restore a file from the snapshot. I am running into permission issue.

Jump to solution

The user you are using does not have the file permissions to read the file you are trying to restore.

The RBAC permissions simply allow that user to create, modify, delete, or otherwise manage snapshots.  It does not give that user permission to over-ride any file-level permissions.

0 Kudos
peglarr
2 Iron

Re: Please help. I am trying to restore a file from the snapshot. I am running into permission issue.

Jump to solution

You should restore the file by copying it not from /ifs/.snapshot but from the original directory in its .snapshot directory.

This should resolve the permissions issue;  Adam is correct, /ifs/.snapshot is owned by root whereas the directory

/ifs/is4/HDFS/elz_uat/tmp/test/d1/.snapshot


should have the same permissions as the parent d1 directory.


To verify, cd to /ifs/is4/HDFS/elz_uat/tmp/test/d1/.snapshot and have a look.  You should see a directory called snap_temp_d1_25nov in there, and the files in that directory.  cp the file of concern from there to wherever you like.


cheers

Rob


0 Kudos