Mode and ownership
Prev | Chapter 4. Tips and tricks | Next

## Mode and ownership

Sometimes it is useful to change the mode and/or ownership of a procfs entry. Here is an example that shows how to achieve that:

    struct proc_dir_entry* entry;

    entry->mode =  S_IWUSR |S_IRUSR | S_IRGRP | S_IROTH;
    entry->uid = 0;
    entry->gid = 100;

Prev | Up | Next
Modules | Home | Chapter 5. Example