24 Votes

Error Message: dpkg-deb: error: control directory has bad permissions 777

Question by Guest | Last update on 2022-12-03 | Created on 2018-02-01

I would like to create my own Debian package, but I receive the following error when creating the dpkg package:

dpkg-deb: error: control directory has bad permissions 777
(must be >=0755 and <=0775)

The directory exists and I think it worked some time ago. What can I do here?

ReplyPositiveNegative
3Best Answer5 Votes

To make it work, you need to set the rights of the folder that you have created for your Debian package. The rights must be between 755 and 775 (inclusive).

If you have a local folder, you can easily do that with chmod. For example, for setting a folder to 755, you can use the following command:

sudo chmod 755 /path/to/folder

If your Debian package folder is stored on a mounted external drive, it's a bit more complicated. In this case, you have to change your mount command so that the rights are correct. For example:

mount -t vboxsf -o uid=1000,gid=2000,umask=022 hdir gdir

The number 1000 here is your personal user ID (UID), the number 2000 your group ID (GID), which you must adjust in this command according to your own IDs to make it work. Here's how to read out your own UID and GID on Linux.

With umask, you specify the maximum permissions for the folder to mount. For NTFS drives, this value defaults to 000, which equates to the rights of 777 and is too much here. Therefore, we change the value to umask=022, which equals the right of 755. You will find out more about that in my answer to the question of how to mount a folder on Linux using your own user account and rights.
Last update on 2022-12-03 | Created on 2018-02-01

ReplyPositive Negative
Reply

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.