3

A previous question just to understand what I'm doing: How to change permissions for a folder and its subfolders/files in one step

So if I change the chmod to 755 for chmod 75 /opt/lampp/htdocs and I restart the system I want the files to be in chmod 755.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Adam Halasz
  • 57,421
  • 66
  • 149
  • 213

3 Answers3

2

Once set, Linux filesystem permissions are unaffected by rebooting the system, unless you have some non-standard software running at boot time which is going back to change them to some default.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
sleepynate
  • 7,926
  • 3
  • 27
  • 38
  • Hmm I'm on Windows 7 with `VirtualBox` because currently I'm testing something, do you think it's because of `VirtualBox` and If I will use a real Linux will save the changed chmod? – Adam Halasz Sep 18 '10 at 02:53
  • 1
    a) I'm positive that file permissions are persistent on a standard linux install b) are you sure you're not starting from a snapshot of your virtualbox instance where the permissions are not set? Try taking a new image of your machine after they're set how you'd like. – sleepynate Sep 18 '10 at 02:54
2

Use:

sudo chmod -R a+rwx PathOfFolder
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Rahul More
  • 514
  • 6
  • 10
0

If some process is changing them at boot, place a changeback in /etc/rc.local.

Joshua
  • 40,822
  • 8
  • 72
  • 132
  • 2
    err... shouldn't we ideally track the offending process instead of ignoring the problem? – Lie Ryan Sep 18 '10 at 03:08
  • I gave up tracking the automation system in ubuntu long ago. I'm convinced the developers do not understand Unix anymore. – Joshua Sep 18 '10 at 14:43