Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Help with HDFS Linux permission Post 302996064 by Padow1 on Tuesday 18th of April 2017 11:14:53 AM
Old 04-18-2017
I am not familiar with hdfs in particular, but based on standard filesystems you will not be able to change ownership/perms on someone elses file. If you want your desind user to be your filesystem administrator you should set up sudo rules for that user to manipulate the files and directories.


Something in /etc/sudoers like the following that will let the desind user modify permissions on files/directories within the /adhoc filesystem:
Code:
User_Alias FILEADMIN = desind
Host_Alias HDFSHOSTS = test
Command_Alias HDFSCOM = hdfs dfs -chmod * /adhoc/*
FILEADMIN HDFSHOSTS=(root) HDFSCOM

Then at the command line you execute
Code:
$ sudo hdfs dfs -chmod 777 /adhoc/desind



Note that ideally you would put the full path to the hdfs command in the sudoers command alias, but I don't know what the full path is on your system. You can use the following command to determine the location
Code:
which hdfs

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help how to copy few records from hdfs to UNIX

Hi All , I am facing one issue here...I have a huge file in hadoop file system.Some disk space issues are thr ,thatswhy I want to copy 1st 100 records from hdfs to local unix.I tried below command but it is no working .Its giving error like cat: Unable to write to output stream.if any one can... (2 Replies)
Discussion started by: STCET22
2 Replies

2. Red Hat

SE Linux write permission denied

Hi, In my server I am getting below errors in "/var/log/messages": Oct 8 14:45:44 LKOGOMEEMM01 kernel: type=1400 audit(1444295744.792:15818): avc: denied { write } for pid=53421 comm="ip" path="/var/VRTSvcs/log/tmp/IPMultiNIC-8" dev=dm-0 ino=2754879 scontext=system_u:system_r:ifconfig_t:s0... (4 Replies)
Discussion started by: rochitsharma
4 Replies

3. Shell Programming and Scripting

Change file permission of mounted drive Linux

I got a problem with the permission of mounted 2TB drive in my Linux/Mint system. All the files in any folder are with 777, which is not what I want. my fstab line for this disk is: UUID=90803E0C803DF974 /media/grape/Workspace1_ntfs ntfs auto,users,permissions 0 0 and blkid gave me: $> blkid ... (4 Replies)
Discussion started by: yifangt
4 Replies

4. UNIX for Advanced & Expert Users

UNIX and HDFS - file systems on same partition.

I am learning Hadoop. As a part of that, Hdfs - Hadoop distributed file system has commands similar to unix where we can create,copy,move files from unix/linux file system to HDFS. My question is 1) how two file systems (unix and hdfs) can coexist on thr same partition.. 2)What if block used... (0 Replies)
Discussion started by: Narendra Eliset
0 Replies

5. UNIX for Beginners Questions & Answers

UNIX and HDFS - file systems on same partition.

I am learning Hadoop. As a part of that, Hdfs - Hadoop distributed file system has commands similar to unix where we can create,copy,move files from unix/linux file system to HDFS. My question is 1) how two file systems (unix and hdfs) can coexist on thr same partition.. 2)What if block... (1 Reply)
Discussion started by: Narendra Eliset
1 Replies

6. Shell Programming and Scripting

Strange permission issue on Linux server.

Starting sendmail throws this error: I decided to see the permission on the files under /etc/mail and this is the output: # ls -ltr total 284 -rwxr-xr-x. 1 root root 1847 Jan 27 2014 virtusertable -rwxr-xr-x. 1 root root 127 Jan 27 2014 trusted-users -rwxr-xr-x. 1 root root 92... (3 Replies)
Discussion started by: mohtashims
3 Replies

7. Shell Programming and Scripting

Read CSV file and delete hdfs, hive and hbase tables

I have a CSV file with hdfs directories, hive tables and hbase tables. 1. first column - hdfs directories 2. second column - hive tables 3. third column - hbase tables I have to check the csv file and look for the first column and delete the hdfs directory from the hdfs path, now... (2 Replies)
Discussion started by: shivamayam
2 Replies

8. Shell Programming and Scripting

How to check total files size in hdfs directory?

Is there a way to calculate the total file size of HDFS file directory in GB or MB? I dont want to use du/df command. Without that is there a way HDFS Directory - /test/my_dir (1 Reply)
Discussion started by: rohit_shinez
1 Replies

9. Shell Programming and Scripting

Shell Script for HDFS Ingestion Using JDBC

Peers, I was in process of building a script that connects to salesforce using jdbc and pull the data using spark and process in hive table. During this process I have encountered a problem where and variable assigned with hadoop command that list files in Azure Data lake is not parsing the... (2 Replies)
Discussion started by: jg355187
2 Replies

10. Shell Programming and Scripting

To get latest hdfs file system

Hi All, I am having below hdfs file system /user/home/dte=2019_01_30/part_1 /user/home/dte=2019_01_30/part_2 /user/home/dte=2019_01_31/part_1 I need to take the latest month hdfs folder while passing date as parameter. For eg . if i pass as Feb month i.e. 20190201(YYYYMMDD), then... (0 Replies)
Discussion started by: Master_Mind
0 Replies
ACL_CLEAR_PERMS(3)					   BSD Library Functions Manual 					ACL_CLEAR_PERMS(3)

NAME
acl_clear_perms -- clear all permissions from an ACL permission set LIBRARY
Linux Access Control Lists library (libacl, -lacl). SYNOPSIS
#include <sys/types.h> #include <sys/acl.h> int acl_clear_perms(acl_permset_t permset_d); DESCRIPTION
The acl_clear_perms() function clears all permissions from the permission set referred to by the argument permset_d. Any existing descriptors that refer to permset_d shall continue to refer to that permission set. RETURN VALUE
The acl_clear_perms() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
If any of the following conditions occur, the acl_clear_perms() function returns -1 and sets errno to the corresponding value: [EINVAL] The argument permset_d is not a valid descriptor for a permission set within an ACL entry. STANDARDS
IEEE Std 1003.1e draft 17 ("POSIX.1e", abandoned) SEE ALSO
acl_add_perm(3), acl_delete_perm(3), acl_get_perm(3), acl_get_permset(3), acl_set_permset(3), acl(5) AUTHOR
Derived from the FreeBSD manual pages written by Robert N M Watson <rwatson@FreeBSD.org>, and adapted for Linux by Andreas Gruenbacher <a.gruenbacher@bestbits.at>. Linux ACL March 23, 2002 Linux ACL
All times are GMT -4. The time now is 04:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy