LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-09-2020, 08:47 PM   #1
Greymug
Member
 
Registered: May 2020
Posts: 50
Blog Entries: 1

Rep: Reputation: Disabled
Question Confusing access permission.../$ can read ls .../# cannot ???


Distro: Linux Mint 19-3 Tricia -
The following is very confusing:
---------------------------------------------------------------------
root@HPLap:/home/garyh/virtual-drives/1# ls
ls: cannot open directory '.': Permission denied
root@HPLap:/home/garyh/virtual-drives/1# exit
exit
garyh@HPLap:~/virtual-drives/1$ ls
boot casper dists EFI isolinux MD5SUMS pool preseed README.diskdefines
garyh@HPLap:~/virtual-drives/1$ sudo su
root@HPLap:/home/garyh/virtual-drives/1# cd
root@HPLap:~# chmod 777 /home/garyh/virtual-drives/1
chmod: cannot access '/home/garyh/virtual-drives/1': Permission denied
root@HPLap:~#
---------------------------------------------------------------------
These replies totally confused me. I am trying to remove the virtual drive '1'. I;d like to know how to remove/prevent virtual drives from running at all.
 
Old 07-09-2020, 09:17 PM   #2
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 727

Rep: Reputation: 171Reputation: 171
Quote:
Originally Posted by Greymug View Post
garyh@HPLap:~/virtual-drives/1$ ls
boot casper dists EFI isolinux MD5SUMS pool preseed README.diskdefines
it would probably help to see the permissions by using ls -al.
 
Old 07-09-2020, 09:26 PM   #3
Greymug
Member
 
Registered: May 2020
Posts: 50

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
re-worked:
--------------------------------------------------------------------------------------------------------
root@HPLap:/home/garyh/virtual-drives# ls -l
ls: cannot access '1': Permission denied
total 0
d????????? ? ? ? ? ? 1
root@HPLap:/home/garyh/virtual-drives# exit
exit
garyh@HPLap:~/virtual-drives/1$ ls -l
total 18
dr-xr-xr-x 1 root root 2048 Jun 24 18:59 boot
dr-xr-xr-x 1 root root 2048 Jun 24 18:59 casper
dr-xr-xr-x 1 root root 2048 Jun 24 18:59 dists
dr-xr-xr-x 1 root root 2048 Jun 24 18:59 EFI
dr-xr-xr-x 1 root root 26624 Jun 24 18:59 isolinux
-r--r--r-- 1 root root 33620 Jun 24 19:00 MD5SUMS
dr-xr-xr-x 1 root root 2048 Jun 24 18:59 pool
dr-xr-xr-x 1 root root 2048 Jun 24 18:59 preseed
-r--r--r-- 1 root root 221 Jun 24 18:59 README.diskdefines
garyh@HPLap:~/virtual-drives/1$
---------------------------------------------------------------------------------------------------------
 
Old 07-09-2020, 09:49 PM   #4
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 727

Rep: Reputation: 171Reputation: 171
Quote:
Originally Posted by Greymug View Post
root@HPLap:/home/garyh
garyh@HPLap:~/virtual-drives/1$ ls -l
those two commands are running ls -l on different directories. from your regular user it would be helpful to see ls -l just on ~/virtual drives to see what the permissions of 1 (not its contents) are.

Last edited by cordx; 07-09-2020 at 10:08 PM.
 
Old 07-09-2020, 11:28 PM   #5
Greymug
Member
 
Registered: May 2020
Posts: 50

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
from new terminal
------------------------------------------------------------
garyh@HPLap:~$ cd virtual-drives
garyh@HPLap:~/virtual-drives$ ls -l
total 1
dr-xr-xr-x 1 root root 2048 Jun 24 19:00 1
garyh@HPLap:~/virtual-drives$ sudo ls -l
[sudo] password for garyh:
ls: cannot access '1': Permission denied
total 0
d????????? ? ? ? ? ? 1
garyh@HPLap:~/virtual-drives$
-------------------------------------------------------------
Go figure..
how are these different directories?
 
Old 07-09-2020, 11:59 PM   #6
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 727

Rep: Reputation: 171Reputation: 171
Quote:
Originally Posted by Greymug View Post
I am trying to remove the virtual drive '1'. I;d like to know how to remove/prevent virtual drives from running at all.
i missed that part initially and got focused on the permissions. what is creating the virtual drives to begin with?
Quote:
Originally Posted by Greymug View Post
from new terminal
------------------------------------------------------------
garyh@HPLap:~$ cd virtual-drives
garyh@HPLap:~/virtual-drives$ ls -l
total 1
dr-xr-xr-x 1 root root 2048 Jun 24 19:00 1
garyh@HPLap:~/virtual-drives$ sudo ls -l
[sudo] password for garyh:
ls: cannot access '1': Permission denied
total 0
d????????? ? ? ? ? ? 1
garyh@HPLap:~/virtual-drives$
-------------------------------------------------------------
Go figure..
how are these different directories?
i don't have an absolute handle on permissions, but since root needs both x and r (see here and here)
Quote:
With the execute bit set you have the permission
  1. to cd into the directory
  2. Also for long listing ls -l i.e. to view the meta data of the files inside the directory (Provided that read permission is there for the directory.

Quote:
The execute bit (x) allows the affected user to enter the directory, and access files and directories inside
to ls -l a directory, i believe you need to keep looking at permissions up the directory structure. i.e. now ls -l /home to see what the permissions are for /virtual-drives.
 
Old 07-10-2020, 01:08 AM   #7
Greymug
Member
 
Registered: May 2020
Posts: 50

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Originally I had a .iso to burn to cd. Somewhere (because a cd burner isn't installed with 19-3) I tried Acetoneiso and Furiusisomount without success until I dropped those and installed K3b. Then I noticed on my desktop that I acquired a Virtual device containing "1" active.
I've been trying to get rid of it since and ran into this mess (of my creation!) Tomorrow, I'll proceed as you suggest and will report back.
 
1 members found this post helpful.
Old 07-10-2020, 01:30 AM   #8
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 727

Rep: Reputation: 171Reputation: 171
if they are still installed, you might open them to see if they show any hint of having created a virtual drive. if so, it would probably be easiest to delete through the program that created it. if not, deleting the program may do so. final fallback semi-nuclear option (if you can't figure out which directory's permission is holding up the works) could be to boot a live usb and see if sudo gets you access when the system isn't mounted.
 
Old 07-10-2020, 08:28 AM   #9
Greymug
Member
 
Registered: May 2020
Posts: 50

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
I uninstalled both of them. So the virtual-drives isn't a "Linux thing"?
I other attempts fail, I'll reinstall them and see if they (1 of 'em) hasa way to manage/delete 'em.
 
Old 07-10-2020, 10:51 AM   #10
Greymug
Member
 
Registered: May 2020
Posts: 50

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
I found a “Magic Cookie” in the directory containing “virtual-drives” which corresponded to the date & time I was working with Acetoneiso. So, I chmod 666 and removed it.
--------------------------------------------------------------------------------------
drwxrwxr-x 2 garyh garyh 4096 Jun 21 21:49 Public
drwx------ 2 garyh garyh 4096 Jun 25 09:13 .ssh
-rw-r--r-- 1 garyh garyh 0 Jun 21 21:55 .sudo_as_admin_successful
drwxr-xr-x 2 garyh garyh 4096 Jun 21 21:49 Templates
drwxrwxrwx 2 garyh garyh 4096 Jun 21 21:49 Videos
drwxrwxr-x 3 garyh garyh 4096 Jul 9 20:50 virtual-drives
-rw------- 1 garyh garyh 50 Jul 10 08:44 .Xauthority
-rw-rw-r-- 1 garyh garyh 131 Jun 25 15:30 .xinputrc
-rw------- 1 garyh garyh 7544 Jul 10 08:45 .xsession-errors
-rw------- 1 garyh garyh 60403 Jul 10 02:09 .xsession-errors.old
garyh@HPLap:~$ sudo su
[sudo] password for garyh:
root@HPLap:/home/garyh# cat -n .Xauthority
1 #HPLap#0#MIT-MAGIC-COOKIE-1#�#��R*�8]������root@HPLap:/home/garyh#
root@HPLap:/home/garyh# chmod 777 .Xauthority
----------------------------------------------------------------------------------------------------------------------------
I then, per your suggestion, checked/corrected permissions and removed contents and directories UNDER “Virtual-Drives”. I finally removed “virtual-drives” from the machine.
Thank you. Solved.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] help proc not mounting, booting read only, other confusing things update in comment spenced Linux From Scratch 2 07-05-2018 12:37 PM
[SOLVED] read shell script code even if only have execute permission not read em31amit Linux - Security 7 06-12-2012 11:32 PM
Cat not read a file in linux, even when read permission is enabled DeepSeaNautilus Linux - Software 2 01-16-2011 04:49 PM
du gives error : "du: cannot access `./.gvfs': Permission denied"du: cannot access `. MihirSahasrabudhe Linux - Security 4 12-29-2009 11:10 AM
iptables; confusing internal access error sedulous Linux - Newbie 6 10-09-2003 11:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration