Linux-Noob Forums
chmod help (permissions) - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html)
+--- Forum: Tips and Tricks (https://www.linux-noob.com/forums/forum-59.html)
+---- Forum: Filesystem Management (https://www.linux-noob.com/forums/forum-26.html)
+---- Thread: chmod help (permissions) (/thread-4049.html)



chmod help (permissions) - morbondu - 2003-12-11


Hi all...

 

I wrote this exe in VB to run on any win32 system(only tested on win98, win2k, and XP :^). chmodhelper.exe is a very very simple program to help out noobs with chmoding files. Basically, it's a learning tool for figure'n out the correct number squence for chmod'n files at command line.

 

example of the chmod command:

morbondu@linux%>chmod 755 public_html

 

Sorry, the chmodhelper.exe will not 'chmod' the file for you. Its a helping/learning tool for you to use while using a terminal connection (ssh) to a linux box while in Windows.

 

Screen shot:

[Image: chmodhelper.gif]

 

The chmodhelper.exe is a standalone executable with no installer or uninstaller. All you have to do is click on the chmodhelper.exe. To delete the program, just delete the chmodhelper.exe file.

 

Download:

chmod helper

 

I hope it helps out a few of you.

 

morbondu

~http://www.grithouse.com~




chmod help (permissions) - anyweb - 2003-12-12


looks good

 

can we see the source ;)

 

cheers

 

anyweb




chmod help (permissions) - morbondu - 2003-12-12


sure thing... tell ya what.. I'll add the source to the zip file... plus, i'll post the a VB form in here.

 

' chmodhelper.exe '



Code:
Option Explicit
Private Sub cmdChmod_Click()
Dim rootSum, rr, rw, re As Byte
Dim userSum, ur, uw, ue As Byte
Dim worldSum, wr, ww, we As Byte

rootSum = 0
rr = 0
rw = 0
re = 0

userSum = 0
ur = 0
uw = 0
ue = 0

worldSum = 0
wr = 0
ww = 0
we = 0

If chkRootR.Value = 1 Then
rr = 4
Else: rr = 0
End If
If chkRootW.Value = 1 Then
rw = 2
Else: rw = 0
End If
If chkRootE.Value = 1 Then
re = 1
Else: re = 0
End If

If chkUserR.Value = 1 Then
ur = 4
Else: ur = 0
End If
If chkUserW.Value = 1 Then
uw = 2
Else: uw = 0
End If
If chkUserE.Value = 1 Then
ue = 1
Else: ue = 0
End If

If chkWorldR.Value = 1 Then
wr = 4
Else: wr = 0
End If
If chkWorldW.Value = 1 Then
ww = 2
Else: ww = 0
End If
If chkWorldE.Value = 1 Then
we = 1
Else: we = 0
End If

rootSum = rootSum + rr + rw + re
userSum = userSum + ur + uw + ue
worldSum = worldSum + wr + ww + we

lblRootOP.Caption = rootSum
lblUserOP.Caption = userSum
lblWorldOP.Caption = worldSum
End Sub

Private Sub cmdClear_Click()
chkRootR.Value = 0
chkRootW.Value = 0
chkRootE.Value = 0
chkUserR.Value = 0
chkUserW.Value = 0
chkUserE.Value = 0
chkWorldR.Value = 0
chkWorldW.Value = 0
chkWorldE.Value = 0

lblRootOP.Caption = "0"
lblUserOP.Caption = "0"
lblWorldOP.Caption = "0"

End Sub

Private Sub cmdClose_Click()
End
End Sub




 

 

I could have used a case statement instead all of those IF statements.. I'm still learning VB. :/

 

morbondu

~http://www.grithouse.com~