[ 
https://issues.apache.org/jira/browse/KUDU-1662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15534093#comment-15534093
 ] 

Adar Dembo commented on KUDU-1662:
----------------------------------

I thought these permissions result from a restrictive umask belonging to the 
user in question. But, they actually stem from how Kudu creates the files. Kudu 
never specifically changes file permisson, but all new files are created with 
0644, except for files that begin as tmpfiles and are renamed into place; those 
are implicitly created as 0600. The instance files mentioned in the description 
are tmpfiles. So, when we create those files, we could immediately fchmod() 
them to 0644. Though we'd have to be careful; if we actually _did_ want a 
secure temporary file, 0600 is obviously what we'd want.

The warning about "proceeding without a lock" when using root is to be 
expected; yes, you're running a read-only tool, but the files in question are 
actively in use by a running Kudu master.


> Kudu fs command reports permission denied
> -----------------------------------------
>
>                 Key: KUDU-1662
>                 URL: https://issues.apache.org/jira/browse/KUDU-1662
>             Project: Kudu
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>         Environment: 1. Kudu demo Quickstart VM (VirtualBox) running CDH 5.8
> 2. New Kudu (VMWare) VM running CDH 5.8 in Centos 6.6. with Kudu installed 
> from command line (no CM)
>            Reporter: Suzanne McIntosh
>            Priority: Minor
>
> This is a minor issue because the uuid is ultimately displayed.
> Issuing 'kudu fs dump uuid ...' gives a permission denied error as shown 
> below. Testing against the Kudu demo VM yielded the same result. Using sudo 
> gives a different error.
> My session below shows results of using plain kudu command, followed by an 
> attempt to clear the permission denied message by using sudo:
>  
> {code}
> [training@localhost ~]$ kudu fs dump uuid -fs_wal_dir /var/lib/kudu/master 
> -fs_data_dirs /var/lib/kudu/master
> I0929 14:57:30.706712  6436 mem_tracker.cc:140] MemTracker: hard memory limit 
> is 4.673157 GB
> I0929 14:57:30.706782  6436 mem_tracker.cc:142] MemTracker: soft memory limit 
> is 2.803894 GB
> IO error: /var/lib/kudu/master/instance: Permission denied (error 13)
> [training@localhost ~]$ sudo kudu fs dump uuid -fs_wal_dir 
> /var/lib/kudu/master -fs_data_dirs /var/lib/kudu/master
> I0929 14:57:44.155582  6448 mem_tracker.cc:140] MemTracker: hard memory limit 
> is 4.673157 GB
> I0929 14:57:44.155685  6448 mem_tracker.cc:142] MemTracker: soft memory limit 
> is 2.803894 GB
> W0929 14:57:44.157841  6450 log_block_manager.cc:1616] IO error: Could not 
> lock /var/lib/kudu/master/data/block_manager_instance: Could not lock 
> /var/lib/kudu/master/data/block_manager_instance: lock 
> /var/lib/kudu/master/data/block_manager_instance: Resource temporarily 
> unavailable (error 11)
> W0929 14:57:44.157857  6450 log_block_manager.cc:1617] Proceeding without lock
> I0929 14:57:44.158095  6448 fs_manager.cc:243] Opened local filesystem: 
> /var/lib/kudu/master
> uuid: "e9e534d6c178470f895279a8eca77a5b"
> format_stamp: "Formatted at 2016-09-28 05:41:04 on localhost.localdomain"
> e9e534d6c178470f895279a8eca77a5b
> ----
> Here are the directory permissions I see in my VMWare VM:
> [training@localhost ~]$ ls -l /var/lib/kudu/master/data/block_manager_instance
> -rw------- 1 kudu kudu 654 Sep 28 01:41 
> /var/lib/kudu/master/data/block_manager_instance
> [training@localhost ~]$ ls -l /var/lib/kudu/master/data
> total 4
> -rw------- 1 kudu kudu 654 Sep 28 01:41 block_manager_instance
> [training@localhost ~]$ ls -l /var/lib/kudu/master
> total 20
> drwxr-xr-x 2 kudu kudu 4096 Sep 28 15:11 consensus-meta
> drwxr-xr-x 2 kudu kudu 4096 Sep 28 01:41 data
> -rw------- 1 kudu kudu  665 Sep 28 01:41 instance
> drwxr-xr-x 2 kudu kudu 4096 Sep 28 01:41 tablet-meta
> drwxr-xr-x 3 kudu kudu 4096 Sep 28 15:11 wals
> [training@localhost ~]$ ls -l /var/lib/kudu/master/data
> total 4
> -rw------- 1 kudu kudu 654 Sep 28 01:41 block_manager_instance
> [training@localhost ~]$ ls -l /var/lib/kudu/master/data/block_manager_instance
> -rw------- 1 kudu kudu 654 Sep 28 01:41 
> /var/lib/kudu/master/data/block_manager_instance
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to