New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Critical file permission error causes VM Manager to fail #1152

Closed
bnvk opened this Issue Aug 27, 2015 · 12 comments

Comments

Projects
None yet
2 participants
@bnvk

bnvk commented Aug 27, 2015

I noticed the following and figured I should file an issue:

Whoops. A critical error has occured. This is most likely a bug in Qubes Manager.

OSError: [Erno 13] Permission denied: /var/lib/qubes/appvm/fedora-21-dvm/apps.icons/firefox.png"
at line 723 of file /usr/lib64/python2.7/site-packages/qubesmanager/main.py

And then in the "Details" dialogue was the following:

line: ret += get_disk_usage_one(os.lstat(os.path.join(dirpath, name)))
func: get_disk_usage
line no.: 116
file: /usr/lib64/python2.7/site-packages/qubes/qubesutils.py
----
line: return qubes.qubesutils.get_disk_usage(self.dir_path)
func: get_disk_utilization
line no.: 930
file: /usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py
----
line: self.value = self.vm.get_disk_utilization()/(1024*1024)
func: update
line no.: 649
file: /usr/lib64/python2.7/site-packages/qubesmanager/table_widgets.py
----
line: self.update()
func: __init__
line no.: 642
file: /usr/lib64/python2.7/site-packages/qubesmanager/table_widgets.py
----
line: self.size_widget = VmSizeOnDiskItem(vm)
func: __init__
line no.: 198
file: /usr/lib64/python2.7/site-packages/qubesmanager/main.py
----
line: vm_row = VmRowInTable(vm, row_no, self.table, self.blk_manager)
func: fill_table
line no.: 634
file: /usr/lib64/python2.7/site-packages/qubesmanager/main.py
----
line: self.fill_table()
func: update_table
line no.: 723
file: /usr/lib64/python2.7/site-packages/qubesmanager/main.py

I had been opening a file in a DisposableVM and then noticed this in the background so it may or may not be related- judging from FF icon error, probably not!

EDIT: it feels like it might be worth noting that the file I was trying to open in a DisposableVM was .csv file on USB thumbdrive and the file appeared to be corrupted and displayed an encoding error

@bnvk bnvk changed the title from Critical file permission error to Critical file permission error causes VM Manager to fail Aug 28, 2015

@bnvk

This comment has been minimized.

Show comment
Hide comment
@bnvk

bnvk Aug 28, 2015

More details- later after I noticed the error posted above, I also noticed most of the VMs in the Qubes VM Manager were no longer visible. Upon restarting my computer (multiple times) upon entering Qubes, the same error shows up and the Qubes VM Manager fails to load. I updated title of issue!

bnvk commented Aug 28, 2015

More details- later after I noticed the error posted above, I also noticed most of the VMs in the Qubes VM Manager were no longer visible. Upon restarting my computer (multiple times) upon entering Qubes, the same error shows up and the Qubes VM Manager fails to load. I updated title of issue!

@bnvk

This comment has been minimized.

Show comment
Hide comment
@bnvk

bnvk Aug 28, 2015

Additionally, this bug seems to be related (by time of occurrence) to many notifications no longer showing up in the notification menu, namely copy to global clipboard notifications.

@marmarek are you available to help me debug this? It is somewhat debilitating to my daily workflow + seems like a potentially interesting / critical bug!

bnvk commented Aug 28, 2015

Additionally, this bug seems to be related (by time of occurrence) to many notifications no longer showing up in the notification menu, namely copy to global clipboard notifications.

@marmarek are you available to help me debug this? It is somewhat debilitating to my daily workflow + seems like a potentially interesting / critical bug!

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Aug 28, 2015

Member

What are permissions in
/var/lib/qubes/appvm/fedora-21-dvm/apps.icons?

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Member

marmarek commented Aug 28, 2015

What are permissions in
/var/lib/qubes/appvm/fedora-21-dvm/apps.icons?

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

@bnvk

This comment has been minimized.

Show comment
Hide comment
@bnvk

bnvk Aug 28, 2015

@marmarek thanks for responding. The permissions of /var/lib/qubes/appvm/fedora-21-dvm/apps.icons when typing ls -l are drw-rwS---

bnvk commented Aug 28, 2015

@marmarek thanks for responding. The permissions of /var/lib/qubes/appvm/fedora-21-dvm/apps.icons when typing ls -l are drw-rwS---

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Aug 28, 2015

Member

On Fri, Aug 28, 2015 at 07:11:52AM -0700, Brennan Novak wrote:

@marmarek thanks for responding. The permissions of /var/lib/qubes/appvm/fedora-21-dvm/apps.icons when typing ls -l are drw-rwS---

And the group is, I guess, root, right? It should be qubes...

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Member

marmarek commented Aug 28, 2015

On Fri, Aug 28, 2015 at 07:11:52AM -0700, Brennan Novak wrote:

@marmarek thanks for responding. The permissions of /var/lib/qubes/appvm/fedora-21-dvm/apps.icons when typing ls -l are drw-rwS---

And the group is, I guess, root, right? It should be qubes...

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

@bnvk

This comment has been minimized.

Show comment
Hide comment
@bnvk

bnvk Aug 28, 2015

no, the user is my expected user and the group is qubes

bnvk commented Aug 28, 2015

no, the user is my expected user and the group is qubes

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Aug 28, 2015

Member

Ok... maybe something wrong with the directory itself (ls -ld)?

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Member

marmarek commented Aug 28, 2015

Ok... maybe something wrong with the directory itself (ls -ld)?

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

@bnvk

This comment has been minimized.

Show comment
Hide comment
@bnvk

bnvk Aug 28, 2015

That was the permissions of the apps.icons directory. Here are more details to clarify:

/var/lib/qubes/appvms/fedora-21-dvm/ has permissions drwxrws--- user qubes

/var/lib/qubes/appvms/fedora-21-dvm/apps.icons/ has permissions drw-rwS--- user qubes

The permissions of my numerous appvm directories vary quite a bit.

Most of them are drwx------ user user
While some are drwxrwsr-x user qubes
And the disp1 is unique with drwx--S--- user qubes

bnvk commented Aug 28, 2015

That was the permissions of the apps.icons directory. Here are more details to clarify:

/var/lib/qubes/appvms/fedora-21-dvm/ has permissions drwxrws--- user qubes

/var/lib/qubes/appvms/fedora-21-dvm/apps.icons/ has permissions drw-rwS--- user qubes

The permissions of my numerous appvm directories vary quite a bit.

Most of them are drwx------ user user
While some are drwxrwsr-x user qubes
And the disp1 is unique with drwx--S--- user qubes

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Aug 28, 2015

Member

Ok, for now fix the permissions with chmod -R a+X /var/lib/qubes
(capital "X" there is important). And I'll try to find why those
permissions were wrong in the first place.

You'll probably need to also restart qubes manager to have it working
back.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Member

marmarek commented Aug 28, 2015

Ok, for now fix the permissions with chmod -R a+X /var/lib/qubes
(capital "X" there is important). And I'll try to find why those
permissions were wrong in the first place.

You'll probably need to also restart qubes manager to have it working
back.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

@bnvk

This comment has been minimized.

Show comment
Hide comment
@bnvk

bnvk Aug 28, 2015

@marmarek that seemed to do the trick, thank so much! If it's at all helpful to debugging, many of the VMs that had user user ownership where VMs that I had installed from backups. Additionally, debian AppVMs were seemingly different ownership pattern

bnvk commented Aug 28, 2015

@marmarek that seemed to do the trick, thank so much! If it's at all helpful to debugging, many of the VMs that had user user ownership where VMs that I had installed from backups. Additionally, debian AppVMs were seemingly different ownership pattern

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Sep 3, 2015

Member

Hopefully fixed in marmarek/qubes-core-admin-linux@ccd8021

  1. Fixed to not generate icons for "internal" VMs
  2. Explicitly set umask to sane value
Member

marmarek commented Sep 3, 2015

Hopefully fixed in marmarek/qubes-core-admin-linux@ccd8021

  1. Fixed to not generate icons for "internal" VMs
  2. Explicitly set umask to sane value

@marmarek marmarek closed this Sep 3, 2015

@bnvk

This comment has been minimized.

Show comment
Hide comment
@bnvk

bnvk Oct 1, 2015

I've tested this exact step with the same corrupt .csv file and the error does not happen. Thanks @marmarek :)

bnvk commented Oct 1, 2015

I've tested this exact step with the same corrupt .csv file and the error does not happen. Thanks @marmarek :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment