-1

how can I add chmod u+s file in the init.rc of linux

I added it as is... chmod u+s but it's not working. any other ideas?

Padma Kumar
  • 19,893
  • 17
  • 73
  • 130
amirelouti
  • 303
  • 1
  • 4
  • 13

1 Answers1

0

The directory where "filename" was had less rights than what you wanted for "filename". So, even though filename was supposed to be 0777, the effective rights were the one of "parent directory". To fix it you do:

chmod 0777 "parentdirectory"
chmod 0777 "parentdirectory/filename"

edit: if yout want

chmod 0777 "sys/etc/folder/anotherfolder/file.rc" 

u have to chmod 0777 "sys/etc/folder/anotherfolder" too. You have to give the right on that Upper folder.#

I mean the Upper folder dosen't have the rights. Thats it

u+s = 4000 
  • I didn't completely understand your point, but I want specifically the parameters u+s, and not 777. +s is the symbolic mode for user. – amirelouti Feb 27 '14 at 14:28