SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I built the postfix packaged (removed sendmail beforehand) from slackbuilds.org manually and installed the package (I have dovecot installed) and when I run /etc/rc.d/rc.postfix start the terminal I get a permission denied error. rc.postfix is in /etc/rc.d however it is not green like the other files, doing chmod +x makes it green/executable but when typing the command it ends up just returning nothing.
I know this is not a lot of information for you, but I do not know what to give you (a build log?). Ill continue to debug and post more back here.
EDIT: Looking in rc.postfix, it calls /usr/sbin/postfix start ....I ran that in the terminal and what do you know postfix starts, so it seems to just be something wrong with permissions in the file? Here is a ls -lr of /etc/rc.d
Heh, I used the stat command for a known working rc.* file such as rc.samba and it had 755 while rc.postfix had 644 (just type stat rc.samba for example). I chmodded rc.postfix and now it works. Time to report!
So it clearly shows you don't have 'x' executable permission set.
So run:
Code:
chmod u=rwx,go=rx /etc/rc.d/rc.postfix
I didn't see this and I just did chmod 755 rc.postfix as all the other files were 755 permissions (I checked using stat) and it made it work. In the futuer if this occurs again, should I just use your chmod instead of changing it to 755?
I didn't see this and I just did chmod 755 rc.postfix as all the other files were 755 permissions (I checked using stat) and it made it work. In the futuer if this occurs again, should I just use your chmod instead of changing it to 755?
I didn't see this and I just did chmod 755 rc.postfix as all the other files were 755 permissions (I checked using stat) and it made it work. In the futuer if this occurs again, should I just use your chmod instead of changing it to 755?
Generally, if you just need to make one of the rc scripts executable, you can do it simply using chmod +x filename as root. If this doesn't work, it is some other issue (wrong filename, not root, etc), since the command is all that is needed. There are various ways to accomplish this (as you can see in this thread and your personal usage) If you read the manpage for chmod like Didier suggested, you would start to understand the various ways to accomplish this. In this case you could use +x, a+x, ugo+x, 755, and u=rwx,go=rx all to accomplish the same thing. However, the first 3 are used to just add the execute permission, where the last 2 will specify specific permissions (in this case, rwxr-xr-x). So, it is best to understand how Linux permissions work so you don't add or remove the wrong permission to the wrong person.
However, the manpage isn't very in-depth if you're not familiar with Linux permissions, so, if you need it, the Arch wiki is a long, but in-depth page covering it.
Generally, if you just need to make one of the rc scripts executable, you can do it simply using chmod +x filename as root. If this doesn't work, it is some other issue (wrong filename, not root, etc), since the command is all that is needed. There are various ways to accomplish this (as you can see in this thread and your personal usage) If you read the manpage for chmod like Didier suggested, you would start to understand the various ways to accomplish this. In this case you could use +x, a+x, ugo+x, 755, and u=rwx,go=rx all to accomplish the same thing. However, the first 3 are used to just add the execute permission, where the last 2 will specify specific permissions (in this case, rwxr-xr-x). So, it is best to understand how Linux permissions work so you don't add or remove the wrong permission to the wrong person.
However, the manpage isn't very in-depth if you're not familiar with Linux permissions, so, if you need it, the Arch wiki is a long, but in-depth page covering it.
I tried regular chmod +x when it was 644 and when trying to start postfix the terminal would just return. All I did then was chmod 755 and it worked right after. I understand a bit how they work, I dont know what each rwrwrw whatever is by heart, I know of a site that converts the permissions to the code which helps me understand a bit more.
Well, if you're familiar at all with binary, that's how it works here. Working from right to left, each has a value that doubles starting from 1, so the execute is 1, write is 2, and read is 4. (or if we did the rwx in number form, it's 421). So if you want read and execute, you'd add the 4 and 1 together to get 5. Add all of them for full permissions it would be 7.
As to chmod +x, there's no reason it wouldn't work unless you typed the command wrong (maybe you accidentally did a minus instead of a plus). Although it's too late now, it would've been interesting to see an ls -l of the file after you attempted the command to see what happened.
Well, if you're familiar at all with binary, that's how it works here. Working from right to left, each has a value that doubles starting from 1, so the execute is 1, write is 2, and read is 4. (or if we did the rwx in number form, it's 421). So if you want read and execute, you'd add the 4 and 1 together to get 5. Add all of them for full permissions it would be 7.
As to chmod +x, there's no reason it wouldn't work unless you typed the command wrong (maybe you accidentally did a minus instead of a plus). Although it's too late now, it would've been interesting to see an ls -l of the file after you attempted the command to see what happened.
I can still do it again if you'd like I am just messing with some stuff. Ill do it again and report back.
EDIT: Alright here we go, recompiled postfix and I made sure to remove postfix using slackpkg as well as the rc. file I put samba as an example as that was installed by default during installation
Code:
-rwxr-xr-x 1 root root 791 Oct 20 2013 rc.samba*
-rw-r--r-- 1 root root 1560 Jun 11 23:31 rc.postfix
Running /etc/rc.d/rc.postfix start gives me permission denied as it did before.
Now I tried chmod u=rwx,go=rx /etc/rc.d/rc.postfix
Code:
-rwxr-xr-x 1 root root 791 Oct 20 2013 rc.samba*
-rwxr-xr-x 1 root root 1560 Jun 11 23:31 rc.postfix*
Now lets try it again, and what do you know it works. So I guess I missed something? I know for sure I didnt do - instead of + I remember seeing that. I didnt try Now I tried chmod u=rwx,go=rx /etc/rc.d/rc.postfix before but only chmod +x rc.postfix
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.