Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
chmod help (permissions)
#1

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~

Reply
#2

looks good

 

can we see the source ;)

 

cheers

 

anyweb

Reply
#3

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~

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)